To Logoff, Restart or Shutdown Windows using Batch you can Simply execute shutdown with the needed parameters. To execute the shutdown command you need the sufficient user privileges.
List of Parameters
To Logoff, Restart or Shutdown Windows using Batch you can Simply execute shutdown with the needed parameters. To execute the shutdown command you need the sufficient user privileges.
List of Parameters
To reboot the pc in VBScript you can use the following snippet.
Set WSHShell = WScript.CreateObject("WScript.Shell") WshShell.Run "C:\WINDOWS\system32\shutdown.exe -r -t 0"
To restart a Application in C# or VB.NET you can use the following line of code.
Application.Restart();
Application.Restart
for more informations see the MSDN: Application.Restart Method