Question

I'm trying to install a WMI Event contained plain .Net assembly on a Win 2003 R2 64 bit server but I'm always getting this error:

System.IO.FileNotFoundException: Could not find file 'C:\WINDOWS\system32\WBEM\Framework\root\MyApp\WMIEvents\Common\MyApp.MyModule.WmiEvents_SN__Version_1.0.53.0.mof'.

  • My user is an administrator
  • I'm running InstallUtil in a command prompt with full priviledges
  • I'm running 64 bit InstallUtil

I'm running out of options here, any help is welcome...

Full InstallUtil output below:

D:\Hosts\web\bin>c:\WINDOWS\microsoft.net\Framework64\v2.0.50727\InstallUtil.exe /i MyApp.MyModule.WmiEvents.dll /showcallstack
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.3053
Copyright (c) Microsoft Corporation.  All rights reserved.


Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the D:\Hosts\web\bin\MyApp.MyModule.WmiEvents.dll assembly's progress.
The file is located at D:\Hosts\web\bin\MyApp.MyModule.WmiEvents.InstallLog.
Installing assembly 'D:\Hosts\web\bin\MyApp.MyModule.WmiEvents.dll'.
Affected parameters are:
   i =
   assemblypath = D:\Hosts\web\bin\MyApp.MyModule.WmiEvents.dll
   logfile = D:\Hosts\web\bin\MyApp.MyModule.WmiEvents.InstallLog
   logtoconsole =
Installing WMI Schema: Started

An exception occurred during the Install phase.
System.IO.FileNotFoundException: Could not find file 'C:\WINDOWS\system32\WBEM\Framework\root\MyApp\WMIEvents\Common\MyApp.MyModule.WmiEvents_SN__Version_1.0.53.0.mof'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
   at System.IO.StreamReader..ctor(String path, Boolean detectEncodingFromByteOrderMarks)
   at System.Management.Instrumentation.SchemaNaming.get_Mof()
   at System.Management.Instrumentation.ManagementInstaller.Install(IDictionary savedState)
   at System.Configuration.Install.Installer.Install(IDictionary stateSaver)
   at System.Configuration.Install.Installer.Install(IDictionary stateSaver)
   at System.Configuration.Install.AssemblyInstaller.Install(IDictionary savedState)
   at System.Configuration.Install.Installer.Install(IDictionary stateSaver)
   at System.Configuration.Install.TransactedInstaller.Install(IDictionary savedState)

The Rollback phase of the installation is beginning.
See the contents of the log file for the D:\Hosts\web\bin\MyApp.MyModule.WmiEvents.dll assembly's progress.
The file is located at D:\Hosts\web\bin\MyApp.MyModule.WmiEvents.InstallLog.
Rolling back assembly 'D:\Hosts\web\bin\MyApp.MyModule.WmiEvents.dll'.
Affected parameters are:
   i =
   assemblypath = D:\Hosts\web\bin\MyApp.MyModule.WmiEvents.dll
   logfile = D:\Hosts\web\bin\MyApp.MyModule.WmiEvents.InstallLog
   logtoconsole =

The Rollback phase completed successfully.

The transacted install has completed.
The installation failed, and the rollback has been performed.

D:\Hosts\web\bin>

Update I've been browsing with procmon and it seems somehow installutil is trying to open that file.

Was it helpful?

Solution 2

It seems the WMI database somehow got corrupted, I ended up removing the entire schema for my app (first I tried to remove just the classes) and then the installutil execution completed without errors.

How to remove published wmi schema?

OTHER TIPS

If you are trying to install a WMI provider that uses WMI.net, try using the /mof switch. That might give you more info. that will help you debug.

http://msdn.microsoft.com/en-us/library/bb608336(v=vs.90).aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top