查看文章 |
重建损坏的Windows Management Instrumentation(WMI)服务
2008-01-06 17:33
重建损坏的Windows Management Instrumentation(WMI)服务 当您使用 Windows XP 时,可能会收到以下错误信息之一:
Unable to view network properties.
Windows cannot display the properties of this connection.Windows Management Instrumentation (WMI) might be corrupted.
Unable to view System Information (MSinfo32)
如果您尝试运行 Windows Management Instrumentation (WMI),您可能会收到以下错误信息: Failed to connect to local computer due to WMI:Generic failure.
注意:要运行 WMI,请在命令提示符下键入 wmimgmt.msc,然后按 Enter 键。原因当 %SystemRoot%System32WbemRepository 文件夹中的文件损坏时,会出现此行为。您可能会反复收到此错误信息,因为 Winmgmt.exe 每隔 30 至 60 秒查看一次这些文件。解决方案要解决此问题,请删除这些文件,然后在 %SystemRoot%System32WbemRepository 文件夹中重新创建它们。为此,请按照下列步骤操作:
适用于:
程序代码如下: @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 运行sfc /scsnnow也能修复 解决上面的问题后发现日志启动不了, 后来把%systemroot%/system32/config 下的AppEvent.evt, SecEvent.evt, SysEvent.Evt,dns.Evt的权限重设了一下就好了 |
最近读者:

