Stopping service from command line using runas

R

Rajesh Khator

I am trying to stop a service using runas from command prompt.The service
name is IBM HTTP Server x.x.x.x.

When I login with the admin user id I am able to stop the service from
command line
But when I use runas command to stop the service it gives the error "invalid
system path."

Any suggestions...

Rajesh
 
M

Mark V

In said:
I am trying to stop a service using runas from command prompt.The
service name is IBM HTTP Server x.x.x.x.

When I login with the admin user id I am able to stop the service
from command line
But when I use runas command to stop the service it gives the
error "invalid system path."

Did you play with those "/profile" and "/env" switches for runas?

Or perhaps just get psservice.exe (free) from http://sysinternals.com

PsService v2.11 - local and remote services viewer/controller
Copyright (C) 2001-2003 Mark Russinovich
Sysinternals - www.sysinternals.com

PsService lists or controls services on a local or remote
Win2K/NT system.

Usage: psservice [\\Computer [-u Username [-p Password]]] <cmd>
<optns>
...
 
R

Rajesh Khator

I have tried with /profile and /env .I believe this has something to do with
the name of the service which has got "." in its name.
But even putting the service name in quotes does not help

Rajesh

Mark V said:
In said:
I am trying to stop a service using runas from command prompt.The
service name is IBM HTTP Server x.x.x.x.

When I login with the admin user id I am able to stop the service
from command line
But when I use runas command to stop the service it gives the
error "invalid system path."

Did you play with those "/profile" and "/env" switches for runas?

Or perhaps just get psservice.exe (free) from http://sysinternals.com

PsService v2.11 - local and remote services viewer/controller
Copyright (C) 2001-2003 Mark Russinovich
Sysinternals - www.sysinternals.com

PsService lists or controls services on a local or remote
Win2K/NT system.

Usage: psservice [\\Computer [-u Username [-p Password]]] <cmd>
<optns>
...
 
R

Ritchie

Rajesh Khator said:
the name of the service which has got "." in its name.
But even putting the service name in quotes does not help

Would you post the exact command that you tried. I'd guess something
like the following would have worked:-

runas /u:dom\usr "net stop \"IBM HTTP Server x.x.x.x\""

or

runas /u:dom\usr "cmd /c \"net stop \"IBM HTTP Server x.x.x.x\"\""
 

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