Couple of years back I wrote a script to simplify the configuration of Cisco switches.
Works fine on win2000 and older, as long as you install something called tobtools (I believe it was a German proggie)
But now on XP it refuses to install, dunno why, probably just too old.
But without it the script doesn't run, now beeing out of scripting for awhile I wondered if someone knows a solution on how to get this working again.
The problem is in < Set tools = WScript.CreateObject("ie4helper.tobtools", "event_" >
Actually just opens a webpage to select a certain switch type and direct to the script typical for that switch type.
*script start*
' SwitchConfigHTML
' Is there input?
ok = False
mijnpad = WScript.ScriptFullName
mijnpadmap = Left(mijnpad, InStrRev(mijnpad, "\")
menu = mijnpadmap + "menu.htm"
Set WshShell = CreateObject("WScript.Shell"
Set bestandssysteem = CreateObject("Scripting.FileSystemObject"
If Not bestandssysteem.FileExists(menu) Then
MsgBox "De sjabloon " & menu & " " & "ontbreekt. " _
& "Script will be closed.", vbCritical
WScript.Quit
End If
Set bestandssysteem = Nothing
Set tools = WScript.CreateObject("ie4helper.tobtools", "event_"
Set iexplore = tools.OpenIEWindowFromTemplate (menu, 900, 600, False)
' On click call procedure "Switch type":
iexplore.document.all.Switch7.OnClick = GetRef("Switch7"
iexplore.document.all.Switch8.OnClick = GetRef("Switch8"
iexplore.document.all.Switch13.OnClick = GetRef("Switch13"
iexplore.document.all.Switch14.OnClick = GetRef("Switch14"
' Show Window:
iexplore.Visible = True
' Wait until window is closed:
tools.WaitForQuit (iexplore)
Sub event_OnQuit
' Close window
' All input recieved
If Not ok Then
' No send message:
MsgBox "Window closed", vbCritical
WScript.Quit
End If
End Sub
' Connect config script
Sub Switch7
WshShell.Run mijnpadmap & "3524-2FiberNew\SwCfg3524-2N.vbs"
' Delete Message from Message "OnQuit"
ok = True
' Close window:
iexplore.Quit
End Sub
**** etc ***
Thanx in advance,
Pat
Works fine on win2000 and older, as long as you install something called tobtools (I believe it was a German proggie)
But now on XP it refuses to install, dunno why, probably just too old.
But without it the script doesn't run, now beeing out of scripting for awhile I wondered if someone knows a solution on how to get this working again.
The problem is in < Set tools = WScript.CreateObject("ie4helper.tobtools", "event_" >
Actually just opens a webpage to select a certain switch type and direct to the script typical for that switch type.
*script start*
' SwitchConfigHTML
' Is there input?
ok = False
mijnpad = WScript.ScriptFullName
mijnpadmap = Left(mijnpad, InStrRev(mijnpad, "\")
menu = mijnpadmap + "menu.htm"
Set WshShell = CreateObject("WScript.Shell"
Set bestandssysteem = CreateObject("Scripting.FileSystemObject"
If Not bestandssysteem.FileExists(menu) Then
MsgBox "De sjabloon " & menu & " " & "ontbreekt. " _
& "Script will be closed.", vbCritical
WScript.Quit
End If
Set bestandssysteem = Nothing
Set tools = WScript.CreateObject("ie4helper.tobtools", "event_"
Set iexplore = tools.OpenIEWindowFromTemplate (menu, 900, 600, False)
' On click call procedure "Switch type":
iexplore.document.all.Switch7.OnClick = GetRef("Switch7"
iexplore.document.all.Switch8.OnClick = GetRef("Switch8"
iexplore.document.all.Switch13.OnClick = GetRef("Switch13"
iexplore.document.all.Switch14.OnClick = GetRef("Switch14"
' Show Window:
iexplore.Visible = True
' Wait until window is closed:
tools.WaitForQuit (iexplore)
Sub event_OnQuit
' Close window
' All input recieved
If Not ok Then
' No send message:
MsgBox "Window closed", vbCritical
WScript.Quit
End If
End Sub
' Connect config script
Sub Switch7
WshShell.Run mijnpadmap & "3524-2FiberNew\SwCfg3524-2N.vbs"
' Delete Message from Message "OnQuit"
ok = True
' Close window:
iexplore.Quit
End Sub
**** etc ***
Thanx in advance,
Pat