Solved

How to script the automatic shut down of a specific process on a terminal server weekly

Posted on 2012-04-05
2
367 Views
Last Modified: 2012-04-09
I have a long story, that ends in a simple question at the bottom, please bear with me:

I have a 2008 R2 Terminal Server in production.  6 of the clients that RDP to this server in our environment simply run a web page that is used for an employee timeclock application.  

The SAAS host has a maintenance window on Sunday between 9AM and 11AM every week in which their servers shut down.  When this happens the web page goes 404 and needs to be reconnected to the service.  

This is a monitor on a wall, connected to a thin client connected to the terminal server.  With over 1000 employees using this system for clocking in and out, we want this to be as simple as possible.  There is no touch interface, no keyboard, no mouse.  Just the card swipe.  The system works perfectly until the Sunday maintenance window.

The station automatically launches iexplore.exe as an environment setting in the Active Directory user setup, so if the iexplore.exe closes it logs the session out, and then the thin client re-establishes a new session and launches iexplore fresh again.

What I am looking for is a way to script the automatic shutdown of the iexplore.exe process on the terminal server at 11:00AM every Sunday.  I would love to be able to aim the script at the 6 specific usernames associated to the 6 stations, however if necessary, if I can put a script together that kills all iexplore.exe processes on the server regardless of what user has it open would be great too.
envirosetting.JPG
0
Comment
Question by:TheMetalicOne
2 Comments
 
LVL 26

Accepted Solution

by:
pony10us earned 500 total points
ID: 37813207
The following shoud force terminate the iexplore.exe process for the 6 users:



@echo off
rem ****************************************
rem * Kill iexplore.exe task for 6 individuals               *
rem * Use scheduled task to set the date/time to run *
rem * change the user1-6 to the login names of the    *
rem * 6 individuals                                                       *
rem ****************************************

 TASKKILL /F /FI "USERNAME eq user1" /IM iexplore.exe
 TASKKILL /F /FI "USERNAME eq user2" /IM iexplore.exe
 TASKKILL /F /FI "USERNAME eq user3" /IM iexplore.exe
 TASKKILL /F /FI "USERNAME eq user4" /IM iexplore.exe
 TASKKILL /F /FI "USERNAME eq user5" /IM iexplore.exe
 TASKKILL /F /FI "USERNAME eq user6" /IM iexplore.exe

exit
0
 
LVL 5

Author Closing Comment

by:TheMetalicOne
ID: 37823068
So simple, yet genius.  Thanks for your help on this.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Event Viewer: MMC Could not create the snap-in, Win7 Pro 6 62
lync 2013 7 55
People keep losing connection to file server 4 56
GPO Delegation 4 30
To effectively work with Diskpart on a Server Core, it is necessary to write some small batch script's, because you can't execute diskpart in a remote powershell session. To get startet, place the Diskpart batch script's into a share on your loca…
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

895 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

18 Experts available now in Live!

Get 1:1 Help Now