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

Postby Gizm0 » Thu Aug 03, 2006 3:36 pm

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\"
InstallAware Software Corporation

SynthaxError
Posts: 6
Joined: Fri Mar 09, 2007 12:05 pm

Postby SynthaxError » Mon May 21, 2007 8:42 am

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:

Postby CandiceJones » Tue May 22, 2007 5:49 pm

Maybe its some Vista security issue, did you test on other operating systems?
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

SteveDude
Posts: 239
Joined: Wed Apr 11, 2007 6:07 pm

Terminate Process

Postby SteveDude » Wed May 23, 2007 4:55 pm

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

Postby SynthaxError » Thu May 24, 2007 9:23 am

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

Postby SynthaxError » Thu May 24, 2007 9:24 am

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

Postby SynthaxError » Fri May 25, 2007 5:59 am

Work great now :D

Edhy
Posts: 125
Joined: Sun Jul 31, 2005 4:09 pm
Location: New York, USA

Postby Edhy » Mon Jun 25, 2007 9:44 am

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
Progytech (Computer Consultants)

DevCompany
Posts: 1
Joined: Tue Nov 13, 2007 12:04 am

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

Postby DevCompany » Tue Nov 13, 2007 12:09 am

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

Postby Gizm0 » Tue Nov 13, 2007 7:39 am

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\"

InstallAware Software Corporation

Edhy
Posts: 125
Joined: Sun Jul 31, 2005 4:09 pm
Location: New York, USA

Postby Edhy » Tue Nov 13, 2007 9:45 am

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
Progytech (Computer Consultants)

swarovski
Posts: 109
Joined: Mon Apr 16, 2007 8:32 pm

Postby swarovski » Tue Nov 13, 2007 10:16 pm

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

Postby Gizm0 » Wed Nov 14, 2007 4:38 am

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\"

InstallAware Software Corporation

jimo
Posts: 342
Joined: Fri Aug 19, 2005 10:59 am
Location: Atlanta, GA
Contact:

Postby jimo » Wed Nov 14, 2007 7:53 am

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

Postby Gizm0 » Wed Nov 14, 2007 6:00 pm

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\"

InstallAware Software Corporation


Return to “Sample Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest