diff --git a/SuperGrate/Classes/Remote.cs b/SuperGrate/Classes/Remote.cs index db63a9c..df431e2 100644 --- a/SuperGrate/Classes/Remote.cs +++ b/SuperGrate/Classes/Remote.cs @@ -24,6 +24,18 @@ public static Task StartProcess(string Target, string CLI, string CurrentD mClass.InvokeMethod("Create", new object[] { CLI, CurrentDirectory, startup }); return true; } + catch(ManagementException e) + { + if(e.ErrorCode == ManagementStatus.InvalidNamespace) + { + Logger.Exception(e, "It appears that the target computer (" + Target + ") has a corrupt WMI installation. Run the command \"winmgmt.exe /resetrepository\" on the target PC to resolve this issue. https://docs.microsoft.com/en-us/windows/win32/wmisdk/winmgmt"); + } + else + { + Logger.Exception(e, "Failed to run a command on " + Target + "."); + } + return false; + } catch (Exception e) { Logger.Exception(e, "Failed to run a command on " + Target + ".");