Code: System****.StreamWriter makebat = new System****.StreamWriter("C:\\batchfilename.bat"); makebat.WriteLine("shutdown -s -t 10"); makebat.Close(); Process.Start("C:\\batchfilename.bat");
2weeks bump to a solved thread (He solved it himself) Nontheless it is a solution for someone asking the same question, but I have to close it due to the huge bump and solved (edited) thread.