Getting the following error when trying to activate the core server:
An unhandled exception has occurred in your application.
Unable to build activation file
landesk.managementsuite.licensing.avtivatecore.exe.log file reports unable to write xml
WMI is not functioning, or has been uninstalled.
A good indication of WMI not functioning is to check:
- Right click on My Computer
- Click on Manage
- Open up Services and Applications
- Click on WMI Control, and then Right click on it and click on properties.
- It is probably corrupted or uninstalled if anything in the general tab that isn't connected, or not being able to click on the Logging, Backup and restore, Security, or advanced tabs
Restart the WMI service. Typically the WMI service (winmgmt) is always running; it starts any time the computer starts, and does not stop until the computer shuts down.
If the service has stopped unexpectedly, it can be restarted by typing net start winmgmt from the command prompt. In addition, the WMI service will automatically restart any time you connect to a WMI namespace using a WMI-based tool (such as Wbemtest) or script.
If the WMI service is stopped and you run a script that uses WMI, the service will usually restart automatically. When experiencing problems with the WMI service, manually stop and restart the service.
To do that:
- Begin by enabling WMI?s verbose logging option; this provides additional information in the WMI error logs that might be useful in diagnosing the problem. You can enable verbose logging by configuring the following registry values:
- Set HKLM\Software\Microsoft\WBEM\CIMOM\Logging to 2
- Set HKLM\Software\Microsoft\WBEM\CIMOM\Logging file Max Size to 4000000.
- Stop the WMI service. As noted, the WMI service is named ?winmgmt.? Stop this service by executing the following command: winmgmt /kill If running Windows XP or Windows Server 2003, the WMI service runs inside a process named Svchost; this process contains other services running under the same account. In addition, there may be multiple instances of Svchost running on your computer. Do not try to stop Svchost itself; instead, stop the WMI service using either winmgmt /kill or net stop winmgmt
- If step 2 succeeds, skip this step and go to step 4. If step 2 fails to stop the winmgmt service, reboot the computer and then go to step 4.
- Run the script again. If the script fails, rebuild the WMI Repository.
- Rebuild the repository.
The WMI Repository is the central storage area for class definitions created by WMI providers, and is located in the %systemDrive%\%windir%\system32\wbem\Repository folder. If the repository has become corrupted, rebuild the repository. Note that doing so might result in the loss of any WMI information in the repository that was not installed at the time WMI (or the operating system) was installed. To restore that information run the specific applications responsible for placing the information in the repository in the first place. To rebuild the repository, do the following:
- Stop the WMI service.
- Type the following commands from the command prompt: cd /d %windir%system32\wbem rename Repository Rep_bak
- The preceding commands rename the file containing the WMI Repository. By renaming the file, the operating system will no longer be able to find the repository. When this occurs, Windows attempts to recreate the repository the next time you access WMI. If the AutoRecover mechanism fails, you can then try to manually rebuild the repository. Rebuilding the repository via the WMI AutoRecover mechanism:
Make a WMI connection to RootDefault; you can do this either by running a script or by using a WMI-based tool such as Wbemtest.exe. If the connection succeeds, the repository is rebuilt. If the connection fails, then try to manually rebuild the repository.
Manually rebuilding the WMI repository:
A batch file can be created with the following Or each command can be ran manually.
net stop winmgmt
rd /S /Q repository
regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll
for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s
for /f %%s in ('dir /b *.mof') do mofcomp %%s
for /f %%s in ('dir /b *.mfl') do mofcomp %%s
echo DONE reboot
Reinstall the operating system
If you still cannot connect to rootdefault, you will need to reinstall the operating system. Reinstall Windows, and then try running the script again. Contact Microsoft Product Support Services If WMI still does not work, you will need to contact Microsoft Product Support Services (PSS). For more information, go to http://support.microsoft.com/default.aspx.