I am trying to repair WMI on client machines remotely. I have this set so that I will run PSEXEC (from the PS Tools suite from SysInternals) on the remote machine, with my domain admin account. It runs a batch file named CALL.BAT (attached), which calls the batch file FIXWMI.BAT (attached). I do this because if I ran the FIXWMI.BAT from the PSEXEC utility, it failed with access denied. When I run PSEXEC on the CALL.BAT file, it runs through a bit better, but seems to want a response from me when running the call c:\fixwmi.bat command in the CALL.BAT file.
Are there any ideas on how I may be able to fix the batch files, or how to repair WMI on a remote computer?
cmd /c echo y | net stop winmgmt
ren C:\WINDOWS\system32\wbem\Repository Repository.old
cmd /c net start winmgmt