Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Sample VBScript to run IE and auto logon to pandora for external display

  • Sample VBScript to run IE and auto logon to pandora for external display

    Posted by FMSer on November 17, 2010 at 21:14

    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 = True

    objExplorer.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.

    miguel replied 14 years, 3 months ago 2 Members · 1 Reply
  • 1 Reply
  • miguel

    Member
    November 23, 2010 at 17:49
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Thanks it is useful script for windows user.

    Bye.