Problem with process privilege escalation

Sep 5 2015 4:49 PM
string file = "C:\test.bat";
ProcessStartInfo psi = new ProcessStartInfo();
psi.Domain = "KRISTIJANK";
psi.UserName = "John";
psi.Password = sec_pass;   //created in Form_Load
psi.WorkingDirectory = @"C:\Windows\System32";
psi.FileName = @"cmd.exe";
psi.Arguments = @"/C del " + file;
psi.UseShellExecute = false;
Process.Start(psi);
 
Idk whay this code not working...
CMD window appear and disapear without an error.
Maybe process arent started as admin? :/ 
 
p.s. John is admin 

Answers (1)