G
Guest
I have an application that fixes some common problems that prevent the SMS
Advanced Client from operating correctly. During this application I need to
stop the Windows Management Instrumentation (winmgmt) service, delete the
Repository directory, and then restart winmgmt which will then automatically
regenerate the Repository directory. Since I am stopping WMI I cannot use
System.Management to perform this. I have tried:
System.Diagnostics.Process.Start("CMD.EXE", "net pause winmgmt");
but this does not work if I try to use 'net pause' or 'net stop'. I have
successfully used this technique to execute other 'net' commands, but this
one will not work. The command 'net stop winmgmt' does work if I do this
manually at the cmd prompt outside of an application. Any help would be
greatly appreciated.
Advanced Client from operating correctly. During this application I need to
stop the Windows Management Instrumentation (winmgmt) service, delete the
Repository directory, and then restart winmgmt which will then automatically
regenerate the Repository directory. Since I am stopping WMI I cannot use
System.Management to perform this. I have tried:
System.Diagnostics.Process.Start("CMD.EXE", "net pause winmgmt");
but this does not work if I try to use 'net pause' or 'net stop'. I have
successfully used this technique to execute other 'net' commands, but this
one will not work. The command 'net stop winmgmt' does work if I do this
manually at the cmd prompt outside of an application. Any help would be
greatly appreciated.