Leatrix WMI Fix
Computers with corrupt WMI repositories won't run Visual Basic scripts or applications which utilise WMI. This is a problem with the user's computer and it's usually caused by dodgy software that's been installed in the past, a virus which has deleted system files or something of that sort.
There is a procedure which you can follow to repair a corrupt WMI repository. I shall outline that procedure below. If you prefer, I have created a simple batch file which does the job for you.
To do an automated repair, you should download Leatrix WMI Fix
Requires Windows XP (SP2 or higher), Windows Vista or Windows 7.
Both 32-bit and 64-bit versions of Windows are supported.
Note that this is a very basic batch file, written in DOS, which performs the steps detailed in the manual repair below. You need Administrator rights to run the script file. If you're using Windows Vista or Windows 7 with User Account Control enabled, you need to right-click on the script file and click Run as Administrator. If Leatrix WMI Fix reports access denied errors, that's what you need to do. It's a very simple batch file, nothing more.
To run the script file, just double-click it. It shouldn't ask you to confirm anything, so just leave it running, it'll take up to a minute to process.
If you would prefer to repair the WMI repository manually, or just want to know the things which Leatrix WMI Fix does, read on.
Repairing a corrupt WMI repository is a straight forward procedure and doesn't take long. However, you do need to be logged into your computer with Administrator rights.
- Firstly, go into Services. To get there, press the left Windows key and the R key together, type Services.msc into the textbox then click ok.
- Scroll down the list of services until you find the Windows Management Instrumentation service. Double-click it to access it's properties.
- Make sure the Startup type is set to Automatic (change it if it isn't) then click Stop.
- Now open up Windows Explorer and browse to C:\Windows\System32\WBEM.
- Delete the Repository folder.
- If you're using 64-bit, browse to C:\Windows\SYSWOW64\WBEM and delete the Repository folder there too.
- Go back to the services list, double-click Windows Management Instrumentation and click Start.
- If you're using Windows XP, bring up a command prompt (you should find it in the start menu) and type in rundll32 wbemupgd, UpgradeRepository /s.
- If you're using Windows Vista or Windows 7, bring up an elevated command prompt. To do that, find the Command Prompt entry in the start menu, right-click it and click Run as Administrator. Then type in winmgmt /salvagerepository.
- The repository will now be rebuilt, this will take up to a minute.