T
Two Toed
Hello everyone,
I am writing a Windows service (in VB.net) that requires the assistance of a
separate "helper" executable. I would like for the service to be able to
automatically start the helper exe when the service starts, and likewise, to
be able to stop the helper exe when the service stops. The catch is that the
helper exe must run under the account of the current user and not under
Local System or Local Service.
I know I can do the following to start the helper in OnStart:
Process1.StartInfo.FileName = "C:\windows\notepad.exe" ' Example exe
Process1.StartInfo.UserName = My.User.Name
Process1.StartInfo.CreateNoWindow = False
Process1.Start()
But notepad.exe will run under the same account as the service (and not
under My.User.Name). I can't add Process1.StartInfo.Password to that because
I don't know the user's password.
Any suggestions/comments as to how I may be able to accomplish this are
appreciated!
I am writing a Windows service (in VB.net) that requires the assistance of a
separate "helper" executable. I would like for the service to be able to
automatically start the helper exe when the service starts, and likewise, to
be able to stop the helper exe when the service stops. The catch is that the
helper exe must run under the account of the current user and not under
Local System or Local Service.
I know I can do the following to start the helper in OnStart:
Process1.StartInfo.FileName = "C:\windows\notepad.exe" ' Example exe
Process1.StartInfo.UserName = My.User.Name
Process1.StartInfo.CreateNoWindow = False
Process1.Start()
But notepad.exe will run under the same account as the service (and not
under My.User.Name). I can't add Process1.StartInfo.Password to that because
I don't know the user's password.
Any suggestions/comments as to how I may be able to accomplish this are
appreciated!