Failed to initialize all required WMI classes


G

geos

Hi everyone,

I have the following messages in WMI Control Properties:

Failed to initialize all required WMI classes
Win32_Processor: Interface: Class not registered
Win32_WMISetting: Successful
Security Information: Successful
Win32_OperatingSystem: Interface: Class not registered

I tried to google for some hints to resolve this problem, but I have
only found some unregistration/re-registration procedure which didn't
worked out.

I am not a professional script writer and I am not very familiar with
setting up the environment in which they run. Could you please give me
some hints how to resolve this problem?

The system is Windows 2003 SP1. I attach this tiny script I wanted to
execute and which fails with the error message:

ActiveX component can't create object
800A01AD
Microsoft VBScript runtime error

This script is supposed to close all instances of Notepad.

strComputer = "."
Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("Select * from
Win32_Process Where Name = 'notepad.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next

I would greatly appreciate any help or suggestion how to make this
script alive.

Thank you in advance,
geos
 
Ad

Advertisements

Ad

Advertisements

Joined
Sep 27, 2012
Messages
1
Reaction score
0
Just a guess - check your quotation marks:
should be:

...... Where Name = "notepad.exe")
not

...... Where Name = 'notepad.exe'")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top