Command line username and password to run the service as

87 views
Skip to first unread message

gregor suttie

unread,
Jun 8, 2015, 8:58:03 AM6/8/15
to topshelf...@googlegroups.com
I can install and stop my service as expected, but when I install it using a username and password, the service starts but reverts back to Local System

Here is how I am trying to install my service in powershell:-

& $exePath install start -instance:AUS -username:$ServiceUserName -password:$ServiceUserPWD

As I said the service does start but its ignoring the username and password I supply, any ideas?

Thanks
Gregor

Dru Sellers

unread,
Jun 8, 2015, 10:37:01 AM6/8/15
to topshelf...@googlegroups.com
i want to say its two dashes - but that is reaching for into the memory banks. :) Nope, I'm wrong. :( https://github.com/Topshelf/Topshelf/blob/develop/src/Topshelf/HelpText.txt#L18

try -username "username" instead of -username:USERNAME

-d

--
You received this message because you are subscribed to the Google Groups "topshelf-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topshelf-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Patterson

unread,
Jun 8, 2015, 12:31:25 PM6/8/15
to topshelf...@googlegroups.com
Remove the "start" before the arguments, you're confusing the command line.

install -instance -username -password 
If you add start AT THE END of the command line it will start the service as well. If you don't want the service started immediately after being installed, remove the start completely.

Reply all
Reply to author
Forward
0 new messages