Starting services at command line with admin password?

D

David Kerber

Running Win2K Server.

I want to be able to start and stop services from a batch (.cmd) file,
without having to logoff as the normal user and log back on as
administrator. I know I can start the services control panel as the
administrator and start and stop services manually, but I really want to
do this from a command line.

Unfortunately, the NET START/STOP command doesn't seem to have any kind
of user ID/password option to specify a user which has permissions to
start and stop services. I also don't want to give the normal user
login permissions to start and stop services.

The reasons I want to do it this way are rather long-winded, so I won't
go into them here, but could if necessary to get the answer I need.
 
S

Steven L Umbach

You can use runas at the command line if you want to do it while you are
logged on. Use runas /? to find runas syntax. There are third party
utilities such as cpau from Joeware.net that may be able to do what you want
in a batch file that can also encode the user credentials. See the link
below if interested in cpau. --- Steve

http://www.joeware.net/win/free/tools/cpau.htm
 
D

David Kerber

n9rou@n0-spam-for-me- said:
You can use runas at the command line if you want to do it while you are
logged on. Use runas /? to find runas syntax. There are third party
utilities such as cpau from Joeware.net that may be able to do what you want
in a batch file that can also encode the user credentials. See the link
below if interested in cpau. --- Steve

http://www.joeware.net/win/free/tools/cpau.htm

Thanks for the suggestions; that looks like exactly like what I need. I
didn't know about the runas command, but I think I'll use the cpau tool
to keep my id's obfuscated.

.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top