I'm trying to opening a program from different user using cmd window (is not exe file so I have to open it from there), the program is start, but the cmd open is still appear (altough I did CreateNoWindow=true
).
Code:
var p = new process();
p.StartInfo = new ProcessStartInfo("cmd.exe", @"/C C:Windows\System32\theprogram")
{
Domain = mydomain,
Username = myusername,
password = securepass,
UseShellExecute = false,
CreateNoWindow = true,
WorkingDirectory = @"C:\Windows\System32\"
};
p.Start();