Windows Script to verify if a program is running and if not, boot this program.

I'm looking for a script that would run in the background of windows automatically when windows is booted.

This script should check the list of running processes for Internet Explorer and if it cannot find it, it should launch Internet explorer.

I'm trying to run this on Windows 8.1 Pro.

Does anyone have any idea of how I could get this started? Eventually show some lines of code on how this would work.

If you have any other questions I will try to answer them.

Thanks in advance.



You could make a script and add a windows scheduled task. Add a scheduled task that runs at either system startup or user logon. I'm thinking user logon, otherwise you'll likely end up with iexplore.exe running headless in the background.

The scheduled task could call a sample batch script like this:
tasklist /FI "IMAGENAME eq iexplore.exe" > nul
if %errorlevel% neq 0 call "c:program filesinternet exploreriexplorer.exe"



You could make a script and add a windows scheduled task. Add a scheduled task that runs at either system startup or user logon. I'm thinking user logon, otherwise you'll likely end up with iexplore.exe running headless in the background.

The scheduled task could call a sample batch script like this:
tasklist /FI "IMAGENAME eq iexplore.exe" > nul
if %errorlevel% neq 0 call "c:program filesinternet exploreriexplorer.exe"



Another approach would be to use the Users startup folder in Windows 8.1

Press the WinKey + r
Type or Copy/Paste the below syntax in the Run Box and press Enter.

%appdata%MicrosoftWindowsStart MenuProgramsStartup

Press the WinKey + r
Type or Copy/Paste the below syntax in the Run Box and press Enter.

notepad.exe

Type or Copy/Paste the below syntax into notepad and save the file as CheckIE.cmd into the Startup folder.
@echo off
tasklist /nh /fi "imagename eq iexplore.exe" | find /i "iexplore.exe" > nul || (start iexplore.exe)
exit

If you want All Users to run the file place the batch file here.

%programdata%MicrosoftWindowsStart MenuProgramsStartup







Share this

Related Posts

There was an error in this gadget