How to Restart or Shutdown Windows 10 PC using Processing 3

Hi @CaseyJ. My guess is you will need to use a non-Processing Java class and access some of the built-in Java functionality for the Windows OS.
If you can properly run a command prompt script or a .bat file that restarts the machine successfully then you can execute the file from Java’s Process Builder.
There is an example here: https://www.geeksforgeeks.org/how-to-execute-native-shell-commands-from-java-program/
I don’t know how version specific these examples are to the jdk Processing uses, but you can always use pure Java in P3 sketches.
Other than that there may be a P3 library that handles OS specific subprocesses but in my experience it’s just as easy to use Java’s built-in classes.
If I have time later I’ll try to run a simple cmd.exe .bat file and see how it works in P3.

1 Like