I had the same problem... No one wants to sendkey a password after running a
runas. I used a util called psexec in my vb scripts. It can be found here
www.sysinternals.com. It is supposed to run on remote machines with a
supplied username and password, but it will run on the local machine if you
specify \\localmachine. Here is the piece of script that I am running to use
the route command to kill the internet on a machine that uses the system
account when a "user" logs on. 

WshShell.Run("psexec \\" & wshnetwork.computername & " -s route delete
0.0.0.0 mask 0.0.0.0"), 0, true

You can specify a username and password, or just use the system account...

Landon.


-----Original Message-----
From: Mike Staines [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 2:21 PM
To: NT 2000 Discussions
Subject: Runas




I want to use runas in a batch script. How do I input the password into the
batch script so that it is entered into the runas command correctly?


------
You are subscribed as [EMAIL PROTECTED]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to [EMAIL PROTECTED]

------
You are subscribed as [email protected]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to