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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ending Script after program execution

Status
Not open for further replies.

nroberts420

Programmer
Jun 24, 2003
27
US
I'm setting up a computer that will allow a user to set up an account and thats it. I want the user to log in and then a telnet dialog will come up. I've got that no problem, but after the telnet session ends I want to the computer to automatically logoff and go back to the main windows 2000 login screen. Is there any way to make the script wait until a program finishes execution before it goes to the next line?

 
nroberts420,

Use Windows Script Object. Try this, copy the code below and save it as "Loader.js"

var WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("MyScript.js", 1, true)

Replace "MyScript.js" with your batch/script/exe file. Then run "Loader.js" from Start->Run or from Explorer

Hope it works
Regards


-- AirCon --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top