dseaver
IS-IT--Management
- Jul 13, 2006
- 467
I am trying to make a vbs that opens IE, connects to a w2k machine with realvnc at the address somehost:5800, connect to the vnc server, send ctrl-alt-del via the F8 keypress menu, and populate the logon username with the xp pc's username, here is what I have so far, along with where it stops working:
I am limited to using a script and IE, otherwise I would use a vnc viewer for this, but that is out of the question
Code:
set IE=Wscript.CreateObject("InternetExplorer.Application","objIE_")
IE.Navigate("[URL unfurl="true"]http://somehost:5800")[/URL]
IE.visible = True
WScript.Sleep(10000)
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "{ENTER}"
WScript.Sleep(5000)
WshShell.SendKeys "{F8}"<<Does not bring up the f8 menu
WshShell.Sendkeys"{DOWN}"
WshShell.Sendkeys"{DOWN}"
WshShell.Sendkeys"{DOWN}"
WshShell.Sendkeys"{DOWN}"
WshShell.Sendkeys"{ENTER}"
Wscript.Sleep(1000)
Set WSHNetwork = CreateObject("WScript.Network")
WshShell.SendKeys WSHNetwork.username