RUNAS PASSWORD

  • Thread starter Thread starter Nimit Mehta
  • Start date Start date
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.
 
This could work, but I don't have a password


C:\Documents and Settings\David Candy>runas "/user:serenity\david candy" notepad
<pass
 
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
 
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.
 
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]
 
Back
Top