runas dos command


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?
 
Ad

Advertisements

R

Ray at

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
 
M

Mark V

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
 
S

Steve Majot

Thanks! i'll give it a try!



-----Original Message-----
Mark V wrote:
....
I think this should be

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

Matthias
.
 
M

Mark V

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.
 
Ad

Advertisements


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

Similar Threads

RUNAS command 2
DOS commands 7
DOS Command 3
dos commands 3
RUNAS command prompt and breaking 0
runas 3
RUNAS 4
DOS command equivalent for "uniq" 9

Top