?
Solved

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

Posted on 2014-11-07
2
Medium Priority
?
217 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 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
Suggested Courses

762 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