SamKr
10/31/2018 - 10:58 AM

Powershell

Launches a Powershell command with parameters

using (var pInstance = PowerShell.Create())
{
    pInstance.AddCommand("Start-Process");
    pInstance.AddParameter("-WindowStyle", "hidden");
    pInstance.AddParameter("-FilePath", "\"explorer.exe\"");
    pInstance.AddParameter("-ArgumentList", $"\"{drive}\"");
    pInstance.Invoke();
}