# How to Restart or Shutdown Windows 10 PC using Processing 3

**URL:** <https://discourse.processing.org/t/how-to-restart-or-shutdown-windows-10-pc-using-processing-3/34687>\
**Category:** Coding Questions\
**Created:** [January 17, 2022, 2:52am UTC](https://discourse.processing.org/t/how-to-restart-or-shutdown-windows-10-pc-using-processing-3/34687 "2022-01-17T02:52:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![robertesler](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@robertesler](https://discourse.processing.org/u/robertesler)\
**Post date:** [January 17, 2022, 3:58pm UTC](https://discourse.processing.org/t/how-to-restart-or-shutdown-windows-10-pc-using-processing-3/34687/2 "2022-01-17T15:58:31Z")

</div>

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/](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.

---

_[View the full topic](https://discourse.processing.org/t/how-to-restart-or-shutdown-windows-10-pc-using-processing-3/34687)._
