Hi,
I would like to run my program as different user. Let's say I have following code which will open Run dialog:If we double click the executable of this program it will run in current windows user. I want to run this with different user. To do that normally we right click on exe file and click run as. Then we will enter the user name and password.VB Code:
Private Declare Function SHRunDialog Lib "shell32" Alias "#61" (ByVal hwnd As Long, ByVal I_dont_know_1 As Long, ByVal I_dont_know_2 As Long, ByVal dTitle As String, ByVal dPrompt As String, ByVal uFlags As Long) As Long Private Sub Form_Load() SHRunDialog hwnd, 0, 0, "", "", 2 Unload Me End Sub
I would like to automate this process some how.
Thanks in advance.




Reply With Quote