Posted November 14, 20186 yr 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
November 16, 20186 yr Staff 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)
November 16, 20186 yr Author 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, 20186 yr by Basil62
November 16, 20186 yr Staff No, this one is the batch script. You will need to create my.bat file to run this.
November 16, 20186 yr Author Sorry for another follow up question. So only by making a .bat file? The Batch option, as shown in the screenshot, won't do?
November 16, 20186 yr Staff  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.
November 17, 20186 yr Author Will do so then. Thank you so much for your time and sorry for flooding you with questions!
Create an account or sign in to comment