InstallUtil Publishing WMI Schema to 64 Bit Directory Instead of 32 Bit Directory
Posted
by Nick
on Stack Overflow
See other posts from Stack Overflow
or by Nick
Published on 2010-03-25T15:09:44Z
Indexed on
2010/03/25
15:13 UTC
Read the original article
Hit count: 477
This is similar to this question, but it doesn't look like a good solution was ever determined, so I'm opening a new one with clarified details.
We wrote a .NET service, which among other things, publishes some of the class hierarchy using WMI. On a 64-Bit machine, we are running the 32-bit version of InstallUtil to install the service. It installs successfully, but when the service runs, we receive the following error message when publishing a WMI class using Instrumentation.Publish()
DirectoryNotFoundException - (Could not find a part of the path 'C:\Windows\system32\WBEM\Framework\root\MyNamespace\MyService'.)
However, this directory does exist in the C:\Windows\syswow64 directory. If we manually copy that directory structure to the system32 directory, then everything works. However, we are looking for automated solution, because we have this packaged up in an MSI which we distribute onto many servers.
We have tried running the 64-Bit version of InstallUtil, to see if that would work, however... and this is the really weird part... it gives us an error on install that says
Installing WMI Schema: Started
An exception occurred during the Install phase. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Windows\system32\WBEM\Framework\root\MyNamespace\MyService.mof'.
It looks as if somehow, the WMI installer flipped around. Has anyone else experienced this, or know of a work around?
© Stack Overflow or respective owner