[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Windows Script Host Corrupt

Posted on 2011-09-22
4
Medium Priority
?
662 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Q2 2017 - Latest Malware & Internet Attacks

WatchGuard’s Threat Lab is a group of dedicated threat researchers committed to helping you stay ahead of the bad guys by providing in-depth analysis of the top security threats to your network.  Check out our latest Quarterly Internet Security Report!

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

656 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