Solved

Windows Script Host Corrupt

Posted on 2011-09-22
4
654 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
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 give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
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:…

724 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