码迷,mamicode.com
首页 > 数据库 > 详细

安装SQL SERVER 提示WMI服务失败解决方法

时间:2018-02-23 00:21:06      阅读:491      评论:0      收藏:0      [点我收藏+]

标签:log   安装   sql   解决方法   批处理   tar   call   blog   .exe   

1、原因:WMI服务损坏。

2、解决方法:以管理员身份运行批处理语句。

@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

安装SQL SERVER 提示WMI服务失败解决方法

标签:log   安装   sql   解决方法   批处理   tar   call   blog   .exe   

原文地址:https://www.cnblogs.com/chengeng/p/8460576.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!