runas /user:ComputerName\LocalAdmin "%SystemRoot%\system32\services.msc /s"

  • Thread starter Thread starter Mister.Fred.Ma
  • Start date Start date
M

Mister.Fred.Ma

The command in the subject line doesn't work when typed in the window
for Start->Run

However, when I first issue following command in the same window:

runas /user:ComputerName\LocalAdmin "%SystemRoot%\system32\cmd.exe"

....followed by:

services.msc /s

....it then works. The working directory is c:\WINDOWS\system32.

Why is it required for a shell to be explicitly launched first?

Thanks!

Fred
 
The command in the subject line doesn't work when typed in the window
for Start->Run

However, when I first issue following command in the same window:

runas /user:ComputerName\LocalAdmin "%SystemRoot%\system32\cmd.exe"

...followed by:

services.msc /s

...it then works. The working directory is c:\WINDOWS\system32.

Why is it required for a shell to be explicitly launched first?

Thanks!

Fred

Services.msc is not a valid Win32 application. It requires the
Command Processor to launch it. Try the same thing with
eventvwr.msc and eventvwr.exe to see what I mean.
 
Services.msc is not a valid Win32 application. It requires the
Command Processor to launch it. Try the same thing with
eventvwr.msc and eventvwr.exe to see what I mean.

The event viewer in Start->Settings->ControlPanel->AdministrativeTools
is "eventvwr.msc /s". When this is used with runas in the Start->Run
box, however, nothing happens after the password is typed in. In
contrast, "eventvwr.exe /s" launches an event viewer application.

There is no such difference in the behaviours of "services.msc /s" and
"services.exe /s". *Both* of these commands cause nothing to happen.
But for the immediate problem that I originally posted about, the
simple solution so far is simply to launch

runas /user:ComputerName\LocalAdmin %SystemRoot%\system32\cmd

and then issue

services.msc /s

in the resulting window, as originally described.

Thanks for describing the difference between exe and msc.
 
Fred,

The services.msc console file needs to be loaded by the Microsoft Management
Console program mmc.exe. You can use runas to launch mmc.exe, passing the
console file as the first quoted argument, like this:

runas /user:ComputerName\LocalAdmin "mmc.exe services.msc"

Regards,

Patrick
 
Back
Top