Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can VBScript input username / password into a program?

Status
Not open for further replies.

agross

Technical User
Jan 18, 2006
2
US
I have a script that checks to see if a program is running on a client machine. If the program isn't running, it executes the *.exe . (this is not a vbscript)

Now the program that runs these scripts can at anytime execute another script, say a VBScript.

My question is, the *.exe requires a username / password to be entered in a simple 'pop-up box'. Is there anyway to write a VBScript to input that username / password?

Thanks for your time.
 
nothing explicit to entering usernames or passwords...
vbscript can manipulate windows using the AppActivate method, you can use the SendKeys methods to do Tab's and enter in text etc, this should cover what you need.
however, all of this is very ugly, you end up with flat files with usernames and passwords in them (but more importantly it will all fall flat on its face if anyone is using the interface at the time of the interface changes or you have different window names for different languages or the app changes slightly from an update etc etc etc) some people combat it using stuff like AutoIT as that app has the ability to lock out keyboard and mouse but i wouldnt go there,,sort of negates the point of the app having passwords in the first place..rather circular if you ask me
 
Thank you for the quick reply, gives me a lot to think about.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top