Archiv verlassen und diese Seite im Standarddesign anzeigen : Computer Neutsart
Wie mache ich das wenn ich das Prog ausführe das der PC dann neutstartet
oder gibt es ein CMD befhel?
prozess.start("Shutdown -s") so ist der Shutdown befehl.Restart kenne ich leider nicht.
~inmate
private static void StartShutDown(string param)
{
ProcessStartInfo proc = new ProcessStartInfo();
proc.FileName = "cmd";
proc.WindowStyle = ProcessWindowStyle.Hidden;
proc.Arguments = "/C shutdown " + param;
Process.Start(proc);
}
Restart :
public static void Restart()
{
StartShutDown("-f -r -t 5");
}
Quelle : http://dotnet-snippets.de/dns/windows-herrunterfahren-ausloggen-neustarten-SID455.aspx
würde gerne wissen in VB.NET
KellerKind
11.08.2009, 18:03
shell("shutdown -s -t 10")
so einfach ist das :P
Powered by vBulletin® Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.