Solved

Windows Script Host Corrupt

Posted on 2011-09-22
4
643 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
Comment Utility
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
Comment Utility
also have a look on "GetObject" directive, make sure you passing correct value for it.
0
 

Accepted Solution

by:
hdts earned 0 total points
Comment Utility
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
Comment Utility
Found the resolution on my own
0

Featured Post

Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

Join & Write a Comment

Set OWA language and time zone in Exchange for individuals, all users or per database.
A procedure for exporting installed hotfix details of remote computers using powershell
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 walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now