Discussion Locked

Runas in script

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need to use the "runas" in a batch script but somehow pre-program the script so that the runas doesn't prompt user for password. Can I program the script to do this? An alternitave way instead of "runas" will be helpful also.

Thank you.

3 replies

by lo

Not familiar with RUNAS. You didn't mention the OS/Appication so ...

If you are in a batch on Win*, might get around with redirection. Put PW in a file then ... runas ...

by thomasjhancock

I am using it in a NT 4.0 environment. From dos promp type "runas" and enter (only in winnt). When I run a command ex:

runas /user:Administrator@domain c:\directory\file.bat

It THEN prompts for password. I want this in a batch script, therefore I can't get user's imput.

Thanks!

This discussion is closed to new replies.