Results 1 to 2 of 2

Thread: Script not working after IE update.

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Posts
    2

    Angry Script not working after IE update.

    Morning,

    I have recently found a script for logging in and maping network drives. All worked fine until windows updated to IE8. Now strangely the IE (HTML) part of the script does not function correctly, yet if i run the same script with the same html file off of a network drive it works perfectly!

    Im sure there is some really simple solution to this but i have no clue. I have allowed scripts to be run in IE, just so ya know.

    VBScript
    Code:
    On Error Resume Next
    
    Set objExplorer = WScript.CreateObject("InternetExplorer.Application", "IE_")
    set net = Wscript.CreateObject("Wscript.Network")
    
    objExplorer.Navigate "file:///c:\network\password.htm" 
    objExplorer.ToolBar = 0
    objExplorer.StatusBar = 0
    objExplorer.Width = 450
    objExplorer.Height = 450
    objExplorer.Left = 300
    objExplorer.Top = 200
    objExplorer.Visible = 1 
    
    Do While (objExplorer.Document.Body.All.OKClicked.Value = "")
    Wscript.Sleep 250 
    Loop
    
    strLogin = objExplorer.Document.Body.All.UserLogin.Value
    strPassword = objExplorer.Document.Body.All.UserPassword.Value
    strButton = objExplorer.Document.Body.All.OKClicked.Value
    objExplorer.Quit
    Wscript.Sleep 250
    
    If strButton = "Cancelled" Then
    Wscript.Quit
    Else
    'Wscript.Echo strPassword
    net.MapNetworkDrive "S:", "\\blaaa\documents", , strLogin, strPassword
    net.MapNetworkDrive "R:", "\\blaaa\nbs", , strLogin, strPassword
    net.MapNetworkDrive "X:", "\\blaaa\dump\Sketchup", , strLogin, strPassword
    net.MapNetworkDrive "T:", "\\blaa\drawings", , strLogin, strPassword
    End If
    HTML
    Code:
    <SCRIPT LANGUAGE="VBScript">
    
    Sub RunScript
    OKClicked.Value = "OK"
    End Sub
    
    Sub CancelScript
    OKClicked.Value = "Cancelled"
    End Sub
    
    </SCRIPT>
    
    <BODY>
    <div align="center">
    	<table border="0" width="29%" id="table1">
    		<tr>
    			<td colspan="2">
    			<p align="center">
    			<img border="0" src="mca%20logo%20and%20text.jpg" width="135" height="201"><font face="Arial"><br>
    			<b>Michael Cook Associates Network Login</b></font></td>
    		</tr>
    		<tr>
    			<td>
    <font size="2" face="Arial">
    Login:</font></td>
    			<td><font face="Arial">
    <input type="text" name="UserLogin" size="40"></font></td>
    		</tr>
    		<tr>
    			<td>
    			<p>
    
    <font size="2" face="Arial">
    Password:</font></td>
    		<td><font face="Arial">
    <input type="password" name="UserPassword" size="40"></font></td>
    		</tr>
    		<tr>
    			<td><font face="Arial">
    
    <input id=runbutton class="button" type="button" value=" OK "
    name="ok_button" onClick="RunScript"></font></td>
    			<td><font face="Arial">
    <input id=runbutton class="button" type="button" value="Cancel"
    name="cancel_button" onClick="CancelScript"></font></td>
    		</tr>
    </table>
    </div>
    </p>
    <font face="Arial">
    <input type="hidden" name="OKClicked" size = "20">
    </font>
    </BODY>
    Hope this helps you help me!

    Thanks for looking
    Dan
    Last edited by xiztrn; Aug 25th, 2009 at 05:41 AM. Reason: Poor Subject Name

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width