Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-04-05
2
Medium Priority
?
383 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Redirected folders in a windows domain can be quite useful for a number of reasons, one of them being that with redirected application data, you can give users more seamless experience when logging into different workstations.  For example, if a use…
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

783 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