using (Process proc = new Process()) { proc.StartInfo.FileName = Path.Combine(Environment.SystemDirectory, "shutdown.exe"); proc.StartInfo.Arguments = "-l"; proc.StartInfo.UseShellExecute = false; proc.StartInfo.CreateNoWindow = true; proc.Start(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)