Batch script to fix wmi - urgent

May 9, 2012 at 03:47:02
Specs: Windows 7
Hi
I have this instruction to fix wmi problem:
for %i in ("wbemcomn.dll") do (echo %~$PATH:i)
for %i in ("wmiutils.dll") do (echo %~$PATH:i)
sc config winmgmt start= disabled
cd /D %windir%\system32\wbem
* Check PID in Regedit (My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\CIMOM ->ProcessID
* kill the Process ID Via Task Maneger.
rmdir /s /q repository
rmdir /s /q Logs
mkdir Logs
for /R %i in (*.dll) do (regsvr32 /s %i) \\ Wait for popup message
regsvr32 /s fastprox.dll
for /R %i in (*.exe) do (%i -regserver)
sc config winmgmt start= auto
regsvr32 wbemupgd.dll
net start server && net start workstation && net start AudioSrv && net start termservice

wbemtest.exe

I want to change it to a batch file
How can i do this
* Check PID in Regedit (My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\CIMOM ->ProcessID
* kill the Process ID Via Task Maneger.
probably use the WMI ,what can I do in another way?
Thanks in advancr..


See More: Batch script to fix wmi - urgent

Report •


#1
May 15, 2012 at 07:23:16
for /f "tokens=3" %%i in (
'reg query hklm\software\microsoft\wbem\cimom\ ^| find "ProcessID"'
) do (
set pid=%%i
)
set /a pid=%pid%
taskkill /f /pid %pid%

Tony


Report •
Related Solutions


Ask Question