Solved

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

Posted on 2014-11-07
2
208 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
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel Error per WinZip Add-In 9 59
auto desk feauture 5 50
WinSetup from USB not cooperating 27 78
ProcessExplorer Not responding when opening properties 6 18
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.

912 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now