We are about to switch to a new forum software. Until then we have removed the registration on this forum.
PC - Is it possible to reboot automatically? (Through processing tool)
Dear Professionals Hello. nice to meet you.
I want to code on an embedded PC base. As you know, there are many unexpected things.
Therefore, I want to reset the PC every certain time. ** Is it possible to initialize PC through processing tool?**
Please confirm. Thank you.
Answers
It depends on which OS you're running on. For Windows, you might be able to open (
open()
, or possibleexec()
) a shortcup that reboots the computer. For Mac, there might be a command line command to do it. I seriously doubt it is possible using P5.js, however.launch()
orexec()
-- probably exec.Your reboot shell script will need to have the privs to run, which could be a serious security risk.
Embedded Windows, or Linux? For Win:
Dear jeremydouglass , Embedded Windows
I tried to proceed through shutdown.bat.
Why does not it work?
You can not even open .txt files.
It is likely to be solved if we know only functions that can only be programmed.
Dear TfGuy44, Dear jeremydouglass
Sorry, Sorry. Very thanks.
I Resolved.
launch("c://Users/wee/Desktop/shutdown.bat");
This is a prev post relevant to running commands: https://forum.processing.org/two/discussion/comment/88413/#Comment_88413
Kf
Dear kfrajer, How have you been?
Every time I feel grateful.
Resolved. Thanks for the reply.
Great! Good to hear you found a solution @Gwak
I'm doing pretty good. Thxs for asking :)>-
Kf
@Gwak -- very glad you solved it.
In case other embedded Windows users have the same problem, would you share the contents of your
shutdown.bat
so that they can see your complete solution?@jeremydouglass
launch("c://Users/wee/Desktop/shutdown.bat");
Shutdown.bat is a program that restarts. I did this because it was not processing itself.
Right. What are the lines of batch script code inside
shutdown.bat
?shutdown.exe -r
r means 'windows restart'
^^