Solved

Windows Script Host Corrupt

Posted on 2011-09-22
4
647 Views
Last Modified: 2012-05-12
I can no longer run a VBS script on 1 of 8 identical servers.  I have 8 identical servers and I cannot run the Sciript on 1 of them.  I get a Windows Script Host Error Code 80041002.  the sciript is fine as I run it on all identical servers.  I believe WHS might be corrupt how can i repair and reinstall it?
0
Comment
Question by:hdts
  • 2
  • 2
4 Comments
 
LVL 13

Expert Comment

by:khairil
ID: 36585068
Hi,

I do not think the script is corrupt, but may be some object that call by the script is not available in the machine. You can browse thru the skrip looking for "CreateObject" directive. Take out that portion of code to create new vbs file to create the object and run that vbs file. If it give you error than that object is not install or you do not have permission on that object.
0
 
LVL 13

Expert Comment

by:khairil
ID: 36585073
also have a look on "GetObject" directive, make sure you passing correct value for it.
0
 

Accepted Solution

by:
hdts earned 0 total points
ID: 36710890
This turns out to be the fix for corrupt script problems.

Rebuilding the WMI Repository
If you experience behavior when using WMI, such as application errors or scripts that used to work are no longer working, you may have a corrupted WMI repository. To fix a corrupted WMI repository, use these steps:
Windows XP and Windows Vista
Click Start, Run and type CMD.EXE
Note: In Windows Vista, you need to open an elevated Command Prompt window. To do so, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
Type this command and press Enter:
net stop winmgmt
Using Windows Explorer, rename the folder %windir%\System32\Wbem\Repository. (For example, %windir%\System32\Wbem\Repository_bad). %windir% represents the path to the Windows directory, which is typically C:\Windows.
Switch to Command Prompt window, and type the following and press ENTER after each line:
net start winmgmt
EXIT
0
 

Author Closing Comment

by:hdts
ID: 36898923
Found the resolution on my own
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question