1

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 "............................"
Evan Anderson
  • 141,881
  • 20
  • 196
  • 331
stead1984
  • 577
  • 8
  • 16
  • 32
  • what type of object is oTheEnd? what is the With block that line 501 is contained in? That error is definitely permission denied. – Paul D'Ambra May 13 '11 at 13:00
  • How can in it be permissions if the same user can use a different workstation and the script runs fine? – stead1984 May 13 '11 at 13:36
  • Just to clarify - the problem workstations won't run the script for *anybody* - admins included? – Kara Marfia May 13 '11 at 13:52
  • I think its a permissions error, if you post the section of the script that is causing the error we can look at it – beakersoft May 13 '11 at 10:34
  • Thats right the problem workstation will not run the script regardless of who it is. I've tried 2 normal accounts and local admin accounts. @Kara Marfia – stead1984 May 13 '11 at 14:16
  • Also check your DC logs to see if there's any issue with the computer account of the problem workstations - removing & re-adding to the domain may be the quickest way to check if this is the issue. – Kara Marfia May 13 '11 at 14:21
  • I think mapping drives etc is a red herring. The lines above appear to be writing data to a file. We need to see more of the script. What is the file, where is written to? – Paul D'Ambra May 13 '11 at 16:53
  • The log file just shows what the script was able to fully complete based on each user. (see above) – stead1984 May 16 '11 at 07:37
  • It's probably worth pointing out that regardless of user, I can't run ANY scripts whatsoever. – stead1984 May 16 '11 at 08:16
  • Are these PC's in a domain? Run a gpresult to see if there are restrictions in running wscript. Try a runas local administrator too. – xXhRQ8sD2L7Z May 17 '11 at 04:29
  • Yes the machines are in a domain. – stead1984 May 17 '11 at 08:23
  • Yes the machines are in a domain. Ran a gpresult, no restrictions in running wscript. @ST8Z6FR57ABE6A8RE9UF – stead1984 May 17 '11 at 08:36

3 Answers3

2

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?

Jim B
  • 24,081
  • 4
  • 36
  • 60
0

Check this article out. I agree in that it sounds like a permissions issue with mapping the drives or whatever else it is that your network logon script is trying to do.

http://www.computerperformance.co.uk/Logon/code/code_800A0046.htm

djl236
  • 39
  • 3
0

I note that the line before the line you mention throws the error is .Close ...

So it looks like you are closing something and then referencing it.

Try moving .Close after .title = sTitle

Although it's difficult to be sure without seeing more of the script.

Paul D'Ambra
  • 1,082
  • 1
  • 13
  • 22