Kill Process and Delete Installation folder - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

lekfir
Posts: 130
Joined: Sun Feb 15, 2009 5:26 pm

Kill Process and Delete Installation folder

Hi,
I want to kill 4 processes when upgrading and delete some folders.
How can I perform that and where do I configure it in my aip file?
Thanks!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Kill Process and Delete Installation folder

Hi,

You can try using custom actions. Please note that the User Guide contains some how-to's which may help you:
Detect or stop a process
Remove a file or a folder during installation

In order to detect the upgrade process you can use these installer properties:
* UPGRADINGPRODUCTCODE is set to the Product Code of the package which upgrades the existing installer (it is available in the uninstall process of the old package)
* OLDPRODUCTS is set to the Product Code of the package which is being upgraded (it is available in the install process of the new package)

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lekfir
Posts: 130
Joined: Sun Feb 15, 2009 5:26 pm

Re: Kill Process and Delete Installation folder

Thanks Cosmin,
I added a StopProcess step to the Begin of InstallUISequence. But what are the other parameters that I should set in order to terminate for example NOTEPAD.EXE?
Source Path, Source Type, Function Name, Action Data...

Thanks!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Kill Process and Delete Installation folder

Hi,

After adding the custom action, in its Custom Action Properties page the Action Data field should be set to the name of the process you want to stop (for example "notepad.exe"). The rest of the options can use the default configuration.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
lekfir
Posts: 130
Joined: Sun Feb 15, 2009 5:26 pm

Re: Kill Process and Delete Installation folder

Thanks Cosmin,
Please check I my settings are correct:
Under the InstallExecuteSequence-Uninstall->Stop Process
SourcePath = <AI_CUSTACTS>aicustact.dll
Source Type = Executable(*.exe)
Command Line = Notepad.exe

?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Kill Process and Delete Installation folder

Hi,

I'm afraid these settings are not correct. Like I mentioned in my previous post, only the "Action Data" field should be set (the rest of the options should not be modified). The correct settings are:

Code: Select all

Source Path:   <AI_CUSTACTS>aicustact.dll
Source Type:   Dynamic Linked library (*.dll)
Function Name: StopProcess
Action Data:   notepad.exe
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”