RUNAS PASSWORD

N

Nimit Mehta

I have a batch file, when run, would RUNAS administrator
another batch file. At prompt i want to automatically
insert my password for administrator. Anyway i can have
the password in the batch file itself? so when run it
would RUNAS Admin automatically? I can then convert that
batch file to a .com file using bat2exec for security
reasons, so people cant see the password.
 
D

David Candy

This could work, but I don't have a password


C:\Documents and Settings\David Candy>runas "/user:serenity\david candy" notepad
<pass
 
M

Matthias Tacke

Nimit Mehta said:
I have a batch file, when run, would RUNAS administrator
another batch file. At prompt i want to automatically
insert my password for administrator. Anyway i can have
the password in the batch file itself? so when run it
would RUNAS Admin automatically? I can then convert that
batch file to a .com file using bat2exec for security
reasons, so people cant see the password.

This is an faq with 281 hits in this group:
http://www.google.com/groups?group=microsoft.public.win2000.cmdprompt.admin&q=runas
One solution is
http://www.commandline.co.uk/sanur/

HTH
 
D

David Candy

Not unless redirection works. Note it's three lines. I don't think it does but I don't have a password to be sure.

You can use /savecred but this allows anyone who knows the username only to do anything.
 
T

Torgeir Bakken \(MVP\)

Nimit said:
I have a batch file, when run, would RUNAS administrator
another batch file. At prompt i want to automatically
insert my password for administrator. Anyway i can have
the password in the batch file itself? so when run it
would RUNAS Admin automatically? I can then convert that
batch file to a .com file using bat2exec for security
reasons, so people cant see the password.
Hi

You might get something to work using a Runas wrapper utility or
similar, take a look here:

http://groups.google.com/[email protected]
 

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 in a batch 4
SU or RUNAS from a batch file 6
Running A Two-Step Program From A Batch File 3
RUNAS command 2
runas batch file 1
runas dos command 6
Runas error 1326 1
Running a batch file 4

Top