Call Custom Action befor install but not while uninstall - 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!

ankitkshah
Posts: 13
Joined: Mon Dec 20, 2010 1:28 pm

Call Custom Action befor install but not while uninstall

Hi,

I have created one dll. I want to call the function, which is inside the this dll, before the installation start. But it should not call when package is uninstall or repair? What should I do?

Thanks
Ankit
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Call Custom Action befor install but not while uninstall

Hello Ankit,

You can use a "Call function from standard dll" predefined custom action scheduled after CostFinalize and add your .DLL as a temporary file.

You should also set the custom action's execution condition to:

Code: Select all

(NOT REMOVE="ALL") AND (NOT REINSTALL)
http://msdn2.microsoft.com/en-us/library/aa371175.aspx

Although, if you add the above condition, the custom action will be executed during maintenance modify and the first time install.

Another way would be to use an "Attached custom action".

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ankitkshah
Posts: 13
Joined: Mon Dec 20, 2010 1:28 pm

Re: Call Custom Action befor install but not while uninstall

Hi Mihai,

Thanks for answer me. It work when I pass "NOT Installed" in binary table.

Thanks
Ankit

Return to “Common Problems”