Friday, August 26, 2011

Issue with WSH (Scripting.FileSystemObject 800A01AD)

I recently had a Windows 2008 Server that was unable to execute a VBS script that works with other servers and other combinations of desktops. I decided to break out Process Monitor and try and see if I can figure out what's going on...

To simplify this process, I found this vbs script that trys to utilize the Scripting.FileSystemObject in a script:

cscript Version.vbs

The VBScript program follows:
Option Explicit

Dim objFSO, strFolder

Call MsgBox("WSH Version: " & Wscript.Version _
& vbCrLF & "VBScript major version: " & ScriptEngineMajorVersion _
& vbCrLf & "VBScript minor version: " & ScriptEngineMinorVersion)

strFolder = "C:\Windows"

Set objFSO = CreateObject("Scripting.FileSystemObject")
If (objFSO.FolderExists(strFolder) = True) Then
Call MsgBox("Folder " & strFolder & " exists" _
& vbCrLf & "and the FileSystemObject works fine")
Call MsgBox("Folder " & strFolder & " does NOT exists" _
& vbCrLf & "but the FileSystemObject works fine")
End If

I ran that script on the affected server and, after clicking OK on the WSH Version dialog, I got this message:

I broke out Process Monitor and monitored on the File System. It sounds like it should be a file system error so we'll scope that out first. I filtered for everything but wscript.exe (I executed all my command lines as wscript.exe test.vbs) and nothing appeared. So wscript.exe wasn't even getting to the file system. So I enabled registry filtering and filtered for wscript.exe:

And I reran the script and got this result:

From here I went to another Windows 2008 server and added the missing registry keys (NAME NOT FOUND) and repeated the process again, finding more keys until all were added to the non-functioning server.

I ended up adding the following registry keys:

Windows Registry Editor Version 5.00

@="FileSystem Object"


@="FileSystem Object"






@="Microsoft Scripting Runtime"






For some reason, it is launching the Wscript.exe in a 32bit process (as evidenced by WOW6432Node key). On the working 64bit server I have it is running as a 64bit process.

After entering those registry keys, here is my new result.

Success! Hopefully, if you encounter the same issue, you are not missing any more, or too many more, registry keys. I wonder why they disappeared, but I don't have a way to trace that unfortunately.


N/A said...

I searched the Internet... and when I say I did than I mean that I truly did and no solution nor from MS support site nor from any other forum or source... and then I found first useful info that was pointing to a registry key permissions. After looking into that I have found out that I don't even have the reg key lol :) after re-creating the key error was still there, so as it turned out to be a good path to follow I finally found this nifty solution, and I must say I did some registry cleaning some days before the error popped out... so thank You my dear friend for doing the research :)

N/A said...

Maybe I didn't mention it but the Error Scripting.FileSystemObject 800A01AD is FIXED (it was an error I kept getting when using the VBS file that fixes the transparent desktop icon text when using DreamScene patch in Windows 7) and now my VBS works fine :) and Thank You again !!!