Solved

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

Posted on 2014-11-07
2
213 Views
Last Modified: 2014-11-17
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.
0
Comment
Question by:BBICT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Expert Comment

by:ZabagaR
ID: 40428664
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 files\internet explorer\iexplorer.exe"
0
 
LVL 14

Accepted Solution

by:
Rob Miners earned 500 total points
ID: 40429885
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%\Microsoft\Windows\Start Menu\Programs\Startup

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%\Microsoft\Windows\Start Menu\Programs\Startup
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question