hello,
I have this script that I use on a servicedesk.
Basically it starts the Telnet service on a remote PC and then connects me
to it.
myans = Inputbox("Enter PC Name or IP address")
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "sc \\"& myans &" config tlntsvr start= auto"
objShell.Run "sc \\"& myans &" start TlntSvr"
objShell.Run "telnet " & myans
'objShell.Run "sc \\"& myans &" stop TlntSvr"
'WScript.Quit
Set objShell =nothing
What I want it to do is wait until the telnet program is closed my mysef
then run the following bit of code.
objShell.Run "sc \\"& myans &" stop TlntSvr"
Is that possible?
D