Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Misusing WMI (winmgmts) ? 1

Status
Not open for further replies.

pt777

Technical User
Mar 27, 2004
62
US
I (foolishly) experimented with the following code:

oManager = GETOBJECT("winmgmts:")
oApps = oManager.InstancesOf("Win32_process")
lfound=0
FOR EACH PROCESS IN oApps
IF MY.EXE' $ UPPER(PROCESS.NAME);
Process.delete("Wind32_process") &&BIG MISTAKE!
ENDIF
NEXT

EVEN AFTER I removed the offensive line: 'Process.delete ("Wind32_process")' (on one test computer only) I STILL continually get:

"OLE error code 0x80041010: Unknown COM status code."
"Alias 'PROCESS' not found"

What have I done (to this computer's registry) ? Is it repairable (without reinstalling Windows)?

Thanks in advance for any help in this WMI COM problem.

Philip
 
I assume you've tried restarting?

On XP? Try restoring?

Brian
 
Restarting has failed.

Restoring (XP) is good advice.

Now if I can figure out how to restore XP to a prior state (never done that).

Thanks for your input.

Philip
 
It is under start->programs->accessories->system tools->system restore on my XP Pro.

Brian
 
Thanks Brian,

After about 10 failed restore points I re-connected the PDA to 'activesynch' and (finally) successfully restored to about a week ago.

Things seem to be OK

Thanks again

Philip
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top