Check Process and Terminate it if it's running

Post specialized setup scripts you have created here.
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Check Process and Terminate it if it's running

Post by Gizm0 »

A small script to check if a process is running and terminate it.

If the process is found running, a messagebox is popuped prompting the user to terminate it.

You can change the PROCESS_NAME and PROGRAM_TITLE variables to fit any kind of processes.Now it's using OUTLOOK.exe as an example.

Any feedback welcome.

File Attached:

checkterminateprocess.mia
Last edited by Gizm0 on Mon Jul 16, 2007 9:52 am, edited 3 times in total.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
SynthaxError
Posts: 6
Joined: Fri Mar 09, 2007 12:05 pm

Post by SynthaxError »

thank's a lot for this script, i change PROCESS_NAME and PROGRAM_TITLE but it don't work in windows vista

Code: Select all

Set Variable MSGBOX to 
Set Variable PROGRAM_TITLE to WinZip Executable
Set Persistent Variable PROCESS_NAME to WZQKPICK.EXE
Check for Process "$PROCESS_NAME$", get result into variable RUNNING
if Variable RUNNING Equals TRUE
 MessageBox: Terminate Process, The process $PROCESS_NAME$ is running and it will be terminated in order to continue the installation.$NEWLINE$Please save your work and then click OK.$NEWLINE$Click Cancel if you want to continue without terminating the process.
 if Variable MSGBOX Equals OK
   Terminate Program $PROGRAM_TITLE$
 end
end
 
CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Post by CandiceJones »

Maybe its some Vista security issue, did you test on other operating systems?
Candice Jones
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
SteveDude
Posts: 253
Joined: Wed Apr 11, 2007 6:07 pm

Terminate Process

Post by SteveDude »

I've been able to terminate programs fine on Vista, but haven't tried WinZip Quick Pick. Might want to make sure the title is exact - or try this way...

http://forums.installaware.com/viewtopic.php?t=1344

Haven't tried just using the Class Name without a caption, or even if IA will let you do it.
SynthaxError
Posts: 6
Joined: Fri Mar 09, 2007 12:05 pm

Post by SynthaxError »

CandiceJones wrote:Maybe its some Vista security issue, did you test on other operating systems?
Hi,

no i don't test it on another operating system, i try later
SynthaxError
Posts: 6
Joined: Fri Mar 09, 2007 12:05 pm

Re: Terminate Process

Post by SynthaxError »

SteveDude wrote:I've been able to terminate programs fine on Vista, but haven't tried WinZip Quick Pick. Might want to make sure the title is exact - or try this way...

http://forums.installaware.com/viewtopic.php?t=1344

Haven't tried just using the Class Name without a caption, or even if IA will let you do it.
thank's
SynthaxError
Posts: 6
Joined: Fri Mar 09, 2007 12:05 pm

Post by SynthaxError »

Work great now :D
Edhy
Posts: 138
Joined: Sun Jul 31, 2005 4:09 pm
Location: New York, USA

Post by Edhy »

SynthaxError wrote:Work great now :D
Hi, I am new to IA and have the need to terminate a process which does not have a UI, just the ProgramName.exe.

Would you or anybody else post the exact code on how to do this in IA?

I have tried the IA Terminate Program, but that is not working for my case.

Thanks!
Edhy Rijo
Thom Child and Family Services
DevCompany
Posts: 1
Joined: Tue Nov 13, 2007 12:04 am

Re: Check Process and Terminate it if it's running

Post by DevCompany »

Gizm0 wrote:A small script to check if a process is running and terminate it.

If the process is found running, a messagebox is popuped prompting the user to terminate it.

You can change the PROCESS_NAME and PROGRAM_TITLE variables to fit any kind of processes.Now it's using OUTLOOK.exe as an example.

Any feedback welcome.

File Attached:

<a>checkterminateprocess.mia

Can someone please repost Gizm0's file for the sample script from above. I registered and I still cant access the file.

I'm looking to terminate outlook too and this script would be instant for me.

thanks
DC
thanks
DC
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Post by Gizm0 »

Script is working fine.

Just right click -> Save As.. and you can download it.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
Edhy
Posts: 138
Joined: Sun Jul 31, 2005 4:09 pm
Location: New York, USA

Post by Edhy »

Hi Panagiotis,
The link to the file is not working fine, I am not able to download the script, all I get is an .html reference when trying to Save As, see picture attached. :(

File Attached:

LinkError.png
Edhy Rijo
Thom Child and Family Services
swarovski
Posts: 109
Joined: Mon Apr 16, 2007 8:32 pm

Post by swarovski »

Same here. link is not working...
it seems redirect to the index page of www.installaware.com
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Post by Gizm0 »

That's strange.

I'm re-attaching the document.

File Attached:

checkterminateprocess.mia
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Post by jimo »

Gizm0,

The link is still redirecting to the InstallAware home page.
Jim Oswell
Software Engineering Manager, Dental
Greenway Health, LLC
http://greenwaymedical.com
Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Post by Gizm0 »

Ok, it looks like a cookie issue.

Instead of browsing to forums from www.installaware.com/forum/, browse to http://forums.installaware.com and login from there (you'll probably be redirected to installaware.com/forum again, but if you browse back to forums.installaware.com, you're already logged in). Navigate here to this thread and try to download again.

It will work now.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
Install[b]Aware[/b] Software Corporation
Post Reply