runas

  • Thread starter Thread starter itsme
  • Start date Start date
I

itsme

Can I embedded the password into a batch file so user does not have to key
in the password. For example, my batch below kicks on a command line shell
and I don't want the user to have to input the password.

REM start command line shell as local admin
runas /user:PC1\administrator cmd
 
For Pro:

You can use the /savecred option to save it the first time the password is
entered and you dont need to enter it from then on.

You add the switch to the shortcut target. Right-click the shortcut and
select Properties, then the Shortcut tab. Edit the target line.

For example, this is the line to run Nero from a limited account:

%systemroot%\system32\runas.exe /user:computername\admin
/savecred "D:\Program Files\ahead\Nero\nero.exe"

The first time you run it, enter the password. After that it won't ask for
one again.
 
Beware of the /SAVECRED option -- once used users will be able to execute
any application with Admin privs.

cheers,
 
Is there a way to make XP Home remember the password as well.

I've just re-built my PC, which meant that I had to go back to XP Home
instead of Pro, and find it a pain having to type in the Admin password each
time.
 
Back
Top