I have a login script that displays a HTML-File in IE during the progress of the Login-Script. Unfortunately when it starts the pop-up-blocker and the ActiveX blocker in IE6 in XP SP2 blocks the script.
Here the code in question:
Set IE = CreateObject("InternetExplorer.Application")
With IE
.navigate Path & "logon.htm"
.resizable=0
.height=420
.width=350
.menubar=0
.toolbar=0
.statusBar=0
.FullScreen=True
.visible=1
End With
Do while ie.Busy
' wait for page to load
Wscript.Sleep 100
Loop
LogonServer = WshShell.ExpandEnvironmentStrings("%LOGONSERVER%")
WSID = WSHNetwork.ComputerName
DOMAIN = WshNetwork.UserDomain
sUsername = WSHNetwork.UserName
ie.document.all.Msg1.InnerText = strUser
ie.document.all.Msg3.InnerText = WSID
ie.document.all.Msg4.InnerText = Domain
ie.document.all.Msg5.InnerText = LogonServer
The Path Variable points to a local directory for testing purposes but in the end it will point to a network share.
The html file will display but then nothing happens. After enabled the toolbar and disables the fullscreen I saw that the pop-up blocker and the ActiveX Blocker blocks something from the script.
After inserted a MsgBox "Waiting" in the ie.Busy Loop I saw that it waits forever.
Does anyone have an idea how I can solve this?
Cheers
Salvatore
Here the code in question:
Set IE = CreateObject("InternetExplorer.Application")
With IE
.navigate Path & "logon.htm"
.resizable=0
.height=420
.width=350
.menubar=0
.toolbar=0
.statusBar=0
.FullScreen=True
.visible=1
End With
Do while ie.Busy
' wait for page to load
Wscript.Sleep 100
Loop
LogonServer = WshShell.ExpandEnvironmentStrings("%LOGONSERVER%")
WSID = WSHNetwork.ComputerName
DOMAIN = WshNetwork.UserDomain
sUsername = WSHNetwork.UserName
ie.document.all.Msg1.InnerText = strUser
ie.document.all.Msg3.InnerText = WSID
ie.document.all.Msg4.InnerText = Domain
ie.document.all.Msg5.InnerText = LogonServer
The Path Variable points to a local directory for testing purposes but in the end it will point to a network share.
The html file will display but then nothing happens. After enabled the toolbar and disables the fullscreen I saw that the pop-up blocker and the ActiveX Blocker blocks something from the script.
After inserted a MsgBox "Waiting" in the ie.Busy Loop I saw that it waits forever.
Does anyone have an idea how I can solve this?
Cheers
Salvatore