Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having trouble with script.

Status
Not open for further replies.

mrclasik

Technical User
Dec 16, 2004
18
US
I have a script that I was running with no problems at all, and all of a sudden I'm getting this error. "Could not locate automation class named "Scripting.FileSystemObject".

Line: 4
Char: 1
Code 80020009
Source WScript.CreateObject

Here is the first few lines of the script..

' Create the objects that we'll be using
Set shell = WScript.CreateObject("WScript.Shell")
Set FSO = WScript.CreateObject("Scripting.FileSystemObject")
Set NET = WScript.CreateObject("WScript.Network")

' Initialize Variables
ProfPath = shell.ExpandEnvironmentStrings("%USERPROFILE%")
AppData = shell.ExpandEnvironmentStrings("%APPDATA%")
AllUsers = shell.ExpandEnvironmentStrings("C:\Documents and Settings\All Users")
UName = NET.UserName


Anyone run across this before. Must warn you, I am not script savvy..

Thanks in advance.

Clasik
 
This can occur as part of a security lockdown.

Some anti-malware solutions unregister the DLL, some substitute a junk DLL, I seem to recall a Security Policy setting with this effect as well. Even NTFS security can lock it down for some or all user accounts.

Have you installed a new anti-virus product recently? Is this a machine on a corporate network?
 
No antivirus install as of yet, and not on a corp network, not part of a domain. It's a system that I use to make base images for deployment of XP. I think I'm getting close to figuring out what happened.
 
It's definitely security. It only runs under my logon. I get the error logged in as anyone else. Just to don't know where to go from here...
 
Make sure you have scrrun.dll in %systemroot%/system32. To make sure, you can as well regsvr32 it again.
[tt] regsvr32 c:\windows\system32\scrrun.dll[/tt]
Also, register wscript again with the command line:
[tt] wscript -regserver[/tt]
 
got it... you were dead on TSUJI.. thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top