Recreate the corrupted Windows Management Instrumentation (Wmi) Service

Source: Internet
Author: User

 

WMI Service error occurs when SQL Server 2008 is installed.

Solution:

1. Recreate the damaged Windows Management Instrumentation (Wmi) Service (Test passed)

@ 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

Save the code in bat format and then run it on the server.

2. Another Method

1. Click Start and right-click my computer.
2. Click Manage on the shortcut menu.
3. In the left pane of the Computer Management Console, double-click "services and applications ".
4. Under services and applications, click Services.
5. In the right pane of the Computer Management Console, right-click Windows Management Instrumentation.
6. Click Stop on the shortcut menu.
7. Start Windows Resource Manager and find the % SystemRoot % system32wbemrepository folder.
8. Delete all files in the % SystemRoot % system32wbemrepository folder.
9. restart the computer. Restart the computer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.