Jan. 10, 2005
You could use the Services tool in the operating system. After you
open the tool you could right click the service and click on the logon tab.
There you can specify the account and password. I think you are wanting to
know how to do it from within VS.Net, though. Assuming you haven't deployed
it yet, you could change the Account property in the installer class for the
service. If you change it to User, then when the end user runs InstallUtil,
it will ask for the account name and password in which to run the service
under. I hope this helps and makes sense! :)
Joseph MCAD
"Scott Lezberg (Deltek)" wrote:
How can I set a username and password for a service that already exists in
VB .NET?
Any sample code would be greatly appreciated.
Thanks in advance.
Scott