When you try to install/Upgrade SMS/SCCM clients,you might see the installtion gets failed due to wmi and this might be the cause for failure of application installtion.Here is the simple batch script which can be run on the wmi issus machines locally/remotely with psexec.Just name this batch script as xxxxxxx.bat.
@echo off
REM
%windir%\system32\wbem\winmgmt /clearadap
%windir%\system32\wbem\winmgmt /kill
%windir%\system32\wbem\winmgmt /unregserver
%windir%\system32\wbem\winmgmt /reserver
%windir%\system32\wbem\winmgmt /resyncperf
net stop winmgmt /y
if exist %windir%\system32\wbem\repository.old rmdir /s /q %windir%\system32\wbem\repository.old
ren %windir%\system32\wbem\repository repository.old
regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll
for /f %%s in ('dir /b /s %windir%\system32\wbem\*.dll') do regsvr32 /s %%s
for /f %%s in ('dir /b /s %windir%\system32\wbem\*.mof') do mofcomp %%s
for /f %%s in ('dir /b %windir%\system32\wbem\*.mfl') do mofcomp %%s
net start winmgmt
%windir%\system32\wbem\wmiprvse /regserver
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Hi,
When you try to install/Upgrade SMS/SCCM clients,you might see the installtion gets failed due to wmi and this might be the cause for failure of application installtion.Here is the simple batch script which can be run on the wmi issus machines locally/remotely with psexec.Just name this batch script as xxxxxxx.bat.
Share this post
Link to post
Share on other sites