Esempio n. 1
0
    public bool SetStatic(string ip, string netmask)
    {
        int retVal = WMIMethod.ExecuteMethod(this, new { IPAddress = new string[] { ip }, SubnetMask = new string[] { netmask } });

        if (retVal != 0)
        {
            Console.WriteLine($"Failed to set network settings with error code {retVal}");
        }
        return(retVal == 0);
    }
Esempio n. 2
0
        public ProcessResult Create(string commandLine, string currentDirectory, string processStartupInformation)
        {
            ProcessResult res = WMIMethod.ExecuteStaticMethod <ProcessResult>(new { CommandLine = commandLine, CurrentDirectory = currentDirectory, ProcessStartupInformation = processStartupInformation });

            return(res);
        }
Esempio n. 3
0
 public int AttachDebugger()
 {
     return(WMIMethod.ExecuteMethod <int>(this));
 }
Esempio n. 4
0
 public ProcessOwner GetOwner()
 {
     return(WMIMethod.ExecuteMethod <ProcessOwner>(this));
 }
Esempio n. 5
0
 public dynamic GetOwnerSid()
 {
     return(WMIMethod.ExecuteMethod(this));
 }
Esempio n. 6
0
 public void RenamePrinter(string newName)
 {
     WMIMethod.ExecuteMethod(this, new { NewPrinterName = newName });
 }
Esempio n. 7
0
 public dynamic Activate()
 {
     return(WMIMethod.ExecuteMethod(this));
 }