1.

Solve : Runas command: auto fill password?

Answer»

Hi,
Does anyone know how to auto fill the password in the runas command in the console under windows vista.
E.G. I type runas /user:blackberry "cmd.exe", then I get the question give the password, but I would like to have that the batch file auto gives that password. Any ideas?

Thanks in advance

Blackberry You might try to pipe the password into the command. Don't know if it will work but do know that BLANK passwords are not accepted.

Code: [Select]echo password | runas /user:blackberry "cmd.exe"

Code like this is a security breach and MS may disallow it.

Does not the user parameter need to be in DOMAIN\USER format?sadly the 'runas' command won't let you pipe the password as it is as sidewinder has said and locked down as a security feature.

someone else asked this not to long ago. I think they got it working by USING pstools, psexec is designed to RUN apps on remote machines, but i see no reason why you couldn't get it run on the LOCAL machine.

psexec will allow to hardcode a password into the batch.

hope it helps.



Discussion

No Comment Found