Solved

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

Posted on 2012-04-05
2
366 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
Comment Utility
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
Comment Utility
So simple, yet genius.  Thanks for your help on this.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

If you migrate a Terminal Server licenses server inside the 2008 server family, you can takte advantage of the build-in migration tool. If you like to migrate an older 2003 Server (and the installed client CALs) to a 2008 R2 server for example, you …
I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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…

771 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