Solved

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

Posted on 2012-04-05
2
371 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
[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 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

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 …
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
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…
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…
Suggested Courses

617 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