Shutting down an exe

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
jlab13
Newbie
Posts: 5
Joined: Fri Apr 11, 2003 12:17 am

Shutting down an exe

Post by jlab13 » Fri Apr 11, 2003 8:28 pm

I'd like to shut down an .exe based program.
I tried using the SetFocus command that I use to shutdown other progs, but this isn't a typical program. It runs out of its own shell, not a windows one.
Is there I way to maybe use some sort of Unload command on the actuall exe?

Thanks

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Apr 11, 2003 9:57 pm

I submitted the following answer to "Not Responding" a few days ago. I think it may apply to your problem
Last week I got the following link from Armsys (Thanks again) to help with another problem:

Please try:
ftp://ftp.microsoft.com/services/techne ... t/diagnose

Included here are two files, TLIST.EXE and KILL.EXE. They may work for you. (The files that I got were for WIN98. I understand that NT and 2000 already have these files>?

TLIST will help ID the correct name you need to use with KILL.
KILL does the dirty work.
Hope this helps....good luck.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

jlab13
Newbie
Posts: 5
Joined: Fri Apr 11, 2003 12:17 am

Post by jlab13 » Fri Apr 11, 2003 10:25 pm

Not to sound too stupid, but I just bought this program yesterday.

I copied those 2 files onton my computer, but I'm not sure where to put them and how they will work with MacroSched.

I have alt+function keys to open my programs, and I'm trying to set up the same to shut them down.

Kind of like a Unload Me command in VB.
Thanks again!

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Apr 12, 2003 4:52 am

Your last 2 questions:
1.
I copied those 2 files onton my computer, but I'm not sure where to put them
Copy them into C:\Windows\command folder or any other folder that would normally be in the path. These are "DOS" type of commands and will run in a DOS window.

2.
and how they will work with MacroSched. I have alt+function keys to open my programs, and I'm trying to set up the same to shut them down.
Try this:

Let>RP_WAIT=1
Let>PgmToKill=(Enter Name of Program here using Tlist name).
Run Program>command.com /c c:\windows\command\kill.exe /f %PgmToKill%
===========================
You can use Tlist.exe in the same manner as kill.exe earlier to get the name of the file to be entered into %PgmToKill%. Try this:

Run Program>command.com /c c:\windows\command\tlist.exe

When the window opens, get the name of the program from the right hand column and use that for %PgmToKill%
=====================

Or you could use
Input>What program do you want to KILL?,PgmToKill
to get the value to be used with the kill.exe routine.
==============================

Once you have the first 3 line program above working, then make it a macro and assign it an alt-np key.


Hope this helps, good luck.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

jlab13
Newbie
Posts: 5
Joined: Fri Apr 11, 2003 12:17 am

Post by jlab13 » Mon Apr 14, 2003 12:33 pm

What directory for winxp? As there's no win\command folder?

Thanks for all your help btw!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts