-
Sample VBScript to run IE and auto logon to pandora for external display
We have a TV monitor connected to a PC that will display the group view of our monitored systems. I wrote the following VB script to run the autologin URL (see http://openideas.info/smf/index.php/topic,1775.0.html on how to get autologin to work)
The computer is configured to autologon to Windows, then launch the VB script that opens the URL in full-screen mode with no scrollbars.
[pre]’******************************************************************
‘ Set the URL that will open in the IE Window
‘******************************************************************
StrURL = “http://pandoraserver.domain.com/pandora_console/index.php?loginhash=auto&loginhash_user=autologin&loginhash=a3e69bcc9b27b0678c21198d0c08597f&sec=estado&sec2=operation/agentes/group_view&refr=30”Set wshShell = WScript.CreateObject (“WSCript.shell”)
Set objExplorer = CreateObject(“InternetExplorer.Application”)objExplorer.visible = 0
‘******************************************************************
‘Set IE parameters
‘******************************************************************
objExplorer.Toolbar = 1
objExplorer.StatusBar = 1
objExplorer.FullScreen = TrueobjExplorer.navigate(strURL)
‘******************************************************************
‘Wait for IE to finish loading the URL
‘******************************************************************
Do While objExplorer.Busy
WScript.Sleep 2000 ‘Sleep added to reduce CPU spike issues
Loop‘******************************************************************
‘Show IE Window Now
‘******************************************************************
objExplorer.visible = 1[/pre]Just put this script in the STARTUP folder for the autologon user. Hopefully, someone will find this useful.