Basil62 Posted November 14, 2018 Posted November 14, 2018 I want a program to always run on my computer. Is there a script that forces a program to restart after its process has been stopped? Thanks in advance
Staff Chris Posted November 16, 2018 Staff Posted November 16, 2018 Hi @Basil62, Please try to modify this script to make sure that your application is always running. @ECHO OFF QPROCESS "notepad.exe" >nul 2>&1 && ( echo process notepad.exe is running ) || ( notepad.exe echo process notepad.exe is started ) Note: If you will execute this script via Pulseway, then this application will be launched in the session zero with no GUI interface. Therefore I would suggest you to create the scheduled task which will run on your system every minute and check if this process is running and start it if the process is not running (you may remove the echo statements from this script)
Basil62 Posted November 16, 2018 Author Posted November 16, 2018 (edited) Hello Chris and thank you for replying to my question. Just a followup, since this is the first time I actually associate with scripts. This is a Windows PowerShell script, right? To clarify, I am running Pulseway on Windows 10. Edited November 16, 2018 by Basil62
Staff Chris Posted November 16, 2018 Staff Posted November 16, 2018 No, this one is the batch script. You will need to create my.bat file to run this.
Basil62 Posted November 16, 2018 Author Posted November 16, 2018 Sorry for another follow up question. So only by making a .bat file? The Batch option, as shown in the screenshot, won't do?
Staff Chris Posted November 16, 2018 Staff Posted November 16, 2018 If you will execute this script via Pulseway, then this application will be launched in the session zero with no GUI interface. Therefore I suggested you to use the Windows scheduler to make sure, that the TeamViewer.exe is running on your system at this time. Another thing is - please use the full path for the executable and remove those echo statements.
Basil62 Posted November 17, 2018 Author Posted November 17, 2018 Will do so then. Thank you so much for your time and sorry for flooding you with questions!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now