查看文章
 
重建损坏的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 文件夹中重新创建它们。为此,请按照下列步骤操作:
  1. 单击开始,然后右键单击我的电脑
  2. 在快捷菜单上,单击管理
  3. 在计算机管理控制台的左窗格中,双击“服务和应用程序”。
  4. 在“服务和应用程序”下,单击服务
  5. 在计算机管理控制台的右窗格中,找到然后右键单击 Windows Management Instrumentation
  6. 在快捷菜单上,单击停止
  7. 启动 Windows 资源管理器,然后找到 %SystemRoot%System32WbemRepository 文件夹。
  8. 删除 %SystemRoot%System32WbemRepository 文件夹中的所有文件。
  9. 重新启动计算机。

    当计算机重新启动时,删除的文件会重新创建出来。

    注意:当重新启动计算机时,Windows Management Instrumentation 服务会自动启动。

适用于:

  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
当然更简单的方法就是用批处理的方式, 先打开个记事本,将下面的程序代码复制进去,再将后缀名改为.bat,然后重新启动计算机,到安全模式下运行此文件,再重启就好了~
程序代码如下:

@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的权限重设了一下就好了

类别:系统问题锦集||添加到搜藏 |分享到i贴吧|浏览(1013)|评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
     

   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu