The bat file is stored in the temp folder. And this repair makes 3 bat files, but they delete when done. Here is what they do
set path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
net stop winmgmt /y
del %windir%\System32\Wbem\Repository\*.* /f /s /q
del %windir%\sysWOW64\Wbem\Repository\*.* /f /s /q
net start winmgmt /y
Rebuilding the repository is based on which OS your on
Visat, 7 & 8
winmgmt /salvagerepository
XP
IF EXIST %windir%\system32\wbem\wbemupgd.dll rundll32 wbemupgd, UpgradeRepository
Windows 2003
IF EXIST %windir%\system32\wbem\wbemupgd.dll rundll32 wbemupgd, RepairWMISetup
Final step
for %%i in (%windir%\system32\wbem\*.dll) do RegSvr32 -s %%i
for %%i in (%windir%\system32\wbem\*.exe) do %%i /RegServer
Thats the whole WMI repair
Shane