PC won’t run VB script, error VBScript runtime error ID 800A046

vbscript

I have a few workstations that can't run a network script for mapping network drives etc. I know the script works as it's working for everyone else.

But on 1 or 2 machines (out of 1000) the script won't run at all. I get an error "VBScript runtime error, error ID 800A046.

The script itself is fine, I'm pretty certain of that. Any ideas?

Also have tried as an admin account.

From line 501

      .Open
      .Write "<span id='theEnd'></span>"
      .Close
      Set oTheEnd = .all.theEnd
      .Title = sTitle

      With .ParentWindow.document.body
        .style.backgroundcolor = "LightBlue"
        .style.Font = "10pt 'Arial'"
        '.style.borderStyle = "outset"
        '.style.borderWidth = "4px"
        ' .scroll="no"
      End With
      oIE.Visible = True

    End With ' document
  End With   ' oIE
End Sub

Also worth noting this:

'main
Function main()
    On Error Resume Next

    'Map "<group>" , "<drive>:" , "\\server\<share>"
    Map "DummyGroupName" , "R:" , "\\Servername\Sharename"  

Log File

' Create logfile
If appendlogfile=True Then WriteFlag = 8 Else WriteFlag = 2 End If
sSystemdrive = oShell.ExpandEnvironmentStrings("%USERPROFILE%")
Set logfile = oFSO.OpenTextFile (sSystemdrive & "\logon.log", WriteFlag, True)
logfile.Writeline "............................"

Best Answer

This error is permission denied. Unfortunately this could be from anywhere in the script not just the linie it complains about. Since you know that the problem is on the workstation and not the drive mapping, I would think that the problem is permissions on DCOM or a directory on the local workstation. You mention that they can't run any scripts I would first try reinstalling vbscript to see if that solves the problem.

On a side note if this is mapping drives why not use group policy preferences and eliminate the script altogether?

Related Topic