HostingModel attribute for Windows 2000 and WindowsXP
From: Will Wright (will4wright_at_yahoo.com)
Date: 03/30/04
- Next message: [MS] Scott McNairy: "Re: Open Files"
- Previous message: shawn: "Re: Q: WMI corrupt on XP, is reinstall possible?"
- Messages sorted by: [ date ] [ thread ]
Date: 30 Mar 2004 14:36:08 -0800
I have written a WMI Instance provider and installed it successfully
on Windows 2000. However, when I try to compile the same MOF file on
Windows XP the registration fails due to my not setting the
HostingModel attribute.
Now, I can easily change the MOF to include this HostingModel
attribute, however if I do that then the same MOF file will not
compile on Windows 2000, i.e. I get the following output:
>mofcomp DelProv.mof
Microsoft (R) 32-bit MOF Compiler Version 1.50.1085.0007
Copyright (c) Microsoft Corp. 1997-1999. All rights reserved.
Parsing MOF file: DelProv.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while creating object 5 defined on lines 35 - 40:
0X80041002 Class, instance, or property 'HostingModel' was not found.
Compiler returned error 0x80041001
So, does anyone know if there is a MofComp.exe preprocessor directive
that I could use to exclude the line 'HostingModel =
"NetworkServiceHost"; ' from a compilation on a Windows 2000 machine?
I know that I could ship two different MOF files with my installation,
but I was trying to avoid that.
All help greatly appreciated.
Thanks,
Will
- Next message: [MS] Scott McNairy: "Re: Open Files"
- Previous message: shawn: "Re: Q: WMI corrupt on XP, is reinstall possible?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|