|
An application can't get security higher than the person who ran it.
In order for this to work, your application must be executed, from the very start, using different credentials.
This means either...
1) Holding down Shift while you right-click the icon for the app and clicking "Run As", then supplying the credentials.
2) Using the RunAs command line app to launch your application. but since the username and password would be plainly visible, this isn't the best option.
3) Writing your own launcher application that can launch your application using a username and password. You'll have to use the CreateProcessAsUser[^] Win32 API function to launch your application. The downside to this is how are you going to store the username and password so your launcher app can get to it? If your machines are in a workgroup environment, is this username and password the same on all machines? If so, you've got issues.
Now, noone of these options are the best one. Since the application will be running under a common account, you can't tell who's really doing what with that account. It's a generic that is difficult to administer, and that is a big security concern.
You'd be much better off expanding the rights of the people using the application than you would using the RunAs service.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello Dave!
Thank you for replying.
I think the 3rd option is the suitable one if I keep the encrypted username and password in the text file or registry
Do you?
|
|
|
|
|
Encrpyting it isn't the hard part. Get the CreateProcessAsUser part to work first.
After being a LAN Admin for many years, I'm still going to tell you that this is NOT the way to go.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a text box with the value "Hello There"
How do I get the following i.e. view there on the next line....
Hello
There
I remember in VB6 it was something like
txtLine.Text = "Hello" & Chr(13) & "There"
I must be something wrong, what is it.
Thanks in advance
|
|
|
|
|
Dim sArray() as string = Split(textbox1.text)
dim x as integer
for x = 0 to sArray.Length - 1
Debug.WriteLine(sArray(x))
Next
vbCrLf = Carriage Return
|
|
|
|
|
First, make sure that the TextBox MultiLine property is set to True.
If you want to put a CrLf in the middle of the string, you just do this:
Dim myText As String = "Hello" & Environment.NewLine & "there"
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
I need help. I want to store values into this file and be able to retrieve the values later if the program starts again.
|
|
|
|
|
The App.Config file really isn't meant for that. It's meant to be, from the applications point of view anyway, a ReadOnly file. User configuration settings should normally be stored in their own file.
But since App.Config is just a standard XML file, you can use any XML methods to modify it. Just search the articles for "XML" and you'll find a bunch of examples.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello. I'm a beginner to VB.NET, and i'm sure the solution to my question is easily achieved, however...
I'm trying to have a list of items in a ComboBox. When the user clicks on an item in the combobox, there is a large textbox that I would like a few sentences to appear for each item. How would I go about doing that?
Any help is appreciated ^_^ Thanks.
|
|
|
|
|
Hi,
to add items to the combobox just use the items.add method:
combobox.items.add("Item to add")
to change the textbox catch the combobox selectedindex changed (or there maybe a click event as well) and then you have to choices, you can look ad the SelectedIndex property, carrying the index of the selected item or you can look at the Text property with the text of the item. Based on that with some if statements or a select case or even using the selectedindex for accessing an array you can update your textbox.
|
|
|
|
|
|
hey guys out there,god bless to all of you. hope you could help me on my problem. our consultant want us to export all of our datasets (came from sql 2000) into excel files using vb.net inorder for the user to manipulate what are the only data they need to print, it varies depend on what type of report it is.
thankz guyz.
hoping for your reply.
(",) KC...
|
|
|
|
|
|
thankz ashishbahrn for the help.
gonna try for it...
god bless...
(",) KC...
|
|
|
|
|
Hi everybody!!!
I' wrote a function on a Visual Basic 6 application that uses an instance of Excel application (it's a hidden instance and I disabled functions that may slow down such as screen update and calculation), I need to control Excel from this application to do some specific operations. The strange thing is that the same operations i run from from my application to control excel are about 10 times slower than running them from VBA (running the same function as an Excel Macro, saved with the workbook). How is it possible??? Is there something that I missed to check???
Thanks in any case. TK
TK
|
|
|
|
|
Let me see the part of your code that you are creating the Excel application and calling some of its operations. You might be accidentally creating a new instance of you Excel app each time you make a call, or, even worse, making multiple instance of Excel. Either way would make your VB app run slow; and, if the latter, increasingly slow.
|
|
|
|
|
Hi Quacks!
Yes, you're right, I'm creating an instance of an Excel application each time I call that function but they're closed every time, so there are no multiple instance of Excel running. The machine I use is a bit slow (pentium 3 500MHz) and in fact if i run my application on a faster machine it's quite good but it's still running proportionally slow, I mean if my app runs on a slow machine, the function is done in 1 minute while in VBA in 10 seconds, and if it runs on a faster machine the function is done in 10 seconds while VBA in 1 second. This is what I can't understand.
Thanks anyway!
TK
|
|
|
|
|
I am to track what files are being copied out of my PC, whether to a floppy disks, hard disk, network drives or any other USB devices. How do I go about doing it?
|
|
|
|
|
You're really going to have a difficult time with this. Since a copy operation is really just opeing a file and reading it's contents, there is no way to tell whe is happening with the data. There are so many ways of copying a file, you can't possibly catch them all.
But, the only way to catch the opening of a file is to write a file system extension. This is NOT an easy task, requiring an in-depth knowledge of NTFS, P/Invoking Win32 API calls, marshalling various structures, ... This is something that higher-level languages, like C# and VB.NET, are not suited for. BTW: The technique I'm refering to is used by FileMon from SysInternals.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have developed app using MSCOMM32.OCX ver shipped with VB6 ( ver 6.0.8*) when ever we open com port and start accessing data CPU start hitting 100% and FAN start to spin up.
I dont understand why it happen. Is it a bug ? or what wrong with it ?
I dont do any thing fancy.
|
|
|
|
|
Pls help!
|
|
|
|
|
WShy does this have to mean there is something wrong? If I look at the sysmon, and refresh a page from CP my CPU hits a 100% also.
I would only get worried if something pegs the CPU and keeps it there continuously or for an excessively long time.
|
|
|
|
|
i need to link a pc to a mobile phone. can somebody help me out.
|
|
|
|
|
use a cable?
Seriously can you better state your question? What do you want to do? Synch? Dial from PC? Which phone, or better which OS is running the mobile?
|
|
|
|
|