runas dos command

  • Thread starter Thread starter Steve Majot
  • Start date Start date
S

Steve Majot

quick question...

i'm trying to write a batch file that launches on a user
logon (basic security permissions).
the batch file executes software that must be run under an
administrative account. i've tried to
use the dos command (under Win2k) runas , however i
can't pass a password through the command without
entering it manually. this defeats the purpose of
launching the batch file from a network push when a user
logs on.
anyone have any ideas?
 
You are correct that you cannot pass a password to runas. You can pass one
to sc.exe though. That is available in the W2K Resource Kit.

Ray at work
 
In said:
quick question...

i'm trying to write a batch file that launches on a user
logon (basic security permissions).
the batch file executes software that must be run under an
administrative account. i've tried to
use the dos command (under Win2k) runas , however i
can't pass a password through the command without
entering it manually. this defeats the purpose of
launching the batch file from a network push when a user
logs on.
anyone have any ideas?

http://www.commandline.co.uk/sanur/
Usage
Pipe your normal Runas commandline into Sanur and specify the
password on Sanur's commandline or use the /i switch to have Sanur
read the password from a file:-

RUNAS <options> | SANUR password
RUNAS <options> | SANUR /i [drive:][path]filename
 
In said:
Mark V wrote:
...
I think this should be

psexec.exe
-----^
from the free pstools ;-)

Matthias

Indeed it should! :-) My bad typo.

However, psexec is available outside the pstools package and
occasionally it is updated. No need for the re-download of the whole
package just to get the new psexec.
 
Back
Top