RE: EIF: Custom Event problem
From: Mike Hayton [MS] (mikehayt__at_online.microsoft.com)
Date: 09/04/04
- Next message: Mike Hayton [MS]: "RE: Use Logging App Block to c"
- Previous message: Mike Hayton [MS]: "Re: ErrorMessageEvent.Raise is not trapped unless applicationLogLevel=debug"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 04 Sep 2004 01:36:09 GMT
Hi Gregory,
The current version of the ManagementInstaller class implementation (which
EIF uses) does not unregister the schema during an uninstall operation.
Effectively we leave it as it is after the schema installation; however you
do have an option to remove the schema from the WMI repository by deleting
the namespace under which the schema resides.
Here’s a script that you could use to delete a namespace (please note:
deleting a namespace will remove all the classes and instances in it)
On Error Resume Next
strMachineName = InputBox("Enter the machine name or '.' for local machine")
set wmiService = GetObject("winmgmts:\\" & strMachineName & "\root")
strNamespace = InputBox("Enter the namespace that you want to delete")
wmiService.Delete("__Namespace.Name='" & strNamespace & "'")
If Err.Number <> 0 then
Wscript.Echo "Error Deleting the Namespace. Error Number: " &
Err.Number
Else
Wscript.Echo "Succesfully Deleted the Namespace " & strNamespace
End If
Hope it helps.
Thx
-- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm -------------------- | | How are EIF (custom) events uninstalled from their corresponding WMI | namespace? I tried installutil /u on the schema dll but the events remain | visible in my CIM studio... | | Regarding custom events I read somewhere 'the event classes have to be all | inside one assembly. | This limitation was imposed by WMI.NET (which EIF leverages).' This is | indeed clear in the custom event sample. But can you have 2 schema | assemblies installed on your machine? Meaning the original and a new custom | one with a different assembly-name + assembly namespace that targets a | different WMI namespace? | | Thanks, | Gregory (gregory@eai.be) | | |
- Next message: Mike Hayton [MS]: "RE: Use Logging App Block to c"
- Previous message: Mike Hayton [MS]: "Re: ErrorMessageEvent.Raise is not trapped unless applicationLogLevel=debug"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|