First time here? Check out the FAQ!
x

How to restart computer by using Javascript?

0 votes
asked by about JavaScript
edited by

How to restart computer by using Javascript?

1 Answer

0 votes
answered by (194k points)

You will need to call a process command and to use the shutdown.exe application. The example command is: System.Diagnostics.Process.Start("shutdown", "-s -t 00") where -s is used for shutdown, you will need to use -r and -t 00 is the time allotted for the shutdown process to initialize.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...