在C盘里面建一个CMD文件。文件内容如下:
@echo on
cd /d c:/temp
if not exist %windir%/system32/wbem goto TryInstall
cd /d %windir%/system32/wbem
net stop winmgmt
winmgmt /kill
if exist Rep_bak rd Rep_bak /s /q
rename Repository Rep_bak
for %%i in (*.dll) do RegSvr32 -s %%i
for %%i in (*.exe) do call :FixSrv %%i
for %%i in (*.mof,*.mfl) do Mofcomp %%i
net start winmgmt
goto End
:FixSrv
if /I (%1) == (wbemcntl.exe) goto SkipSrv
if /I (%1) == (wbemtest.exe) goto SkipSrv
if /I (%1) == (mofcomp.exe) goto SkipSrv
%1 /RegServer
:SkipSrv
goto End
:TryInstall
if not exist wmicore.exe goto End
wmicore /s
net start winmgmt
:End
然后运行该文件 等运行完毕后就可以安装了
本文提供了一个用于修复Windows环境下WinMGMT服务的CMD脚本。通过创建并运行该脚本,可以解决WinMGMT服务相关的问题,包括停止服务、备份和重命名Repository文件夹、重新注册DLL和EXE文件等。
3061

被折叠的 条评论
为什么被折叠?



