Post Build Step

Having trouble running Advanced Installer? Got a bug to report? Post it all here.

Post Build Step

Postby PhilB » Tue Feb 22, 2011 6:30 pm

I wanted to use a post build step to remove the SxsUninstallCA action from the Custom Action table (as described in http://alekdavis.blogspot.com/2010/10/how-to-fix-hanging-uninstaller.html). Unfortunately because I am building an exe setup file, the post build step occurs too late in the process! Any ideas on how I could achieve this?

On a related note the documentation refers to properties such as AI_BUILD_OUTPUT_FILE. Is there a complete list of these build only properties anywhere?

Phil
PhilB
 
Posts: 69
Joined: Fri Jul 06, 2007 4:13 pm

Re: Post Build Step

Postby mihai.petcu » Wed Feb 23, 2011 12:44 pm

Hi Phil,

To solve this you don't need a post build event. You can edit your merge module using Orca.exe and add a condition to the SxsUninstallCA custom action. This can be done from the ModuleInstallExecuteSequence or from the ModuleInstallUISequence table, depending on where the custom action is scheduled. The condition should be:
Code: Select all
NOT Installed

This way the custom action will be conditioned from the merge module to run only during the first installation.
On a related note the documentation refers to properties such as AI_BUILD_OUTPUT_FILE. Is there a complete list of these build only properties anywhere?

There are only two build related properties and both of them are referenced in our user guide under this link.

Best,
Mihai
Mihai Petcu
Advanced Installer Team
http://www.advancedinstaller.com/
mihai.petcu
 
Posts: 3452
Joined: Thu Aug 05, 2010 8:01 am

Re: Post Build Step

Postby PhilB » Wed Feb 23, 2011 1:02 pm

I realise I could edit all the merge modules individually but wanted to avoid this as I consider it to be a potential source of error in the future. The merge modules might for example be updated by a service pack, a later version of the compiler might be used, additional merge modules might be added later, etc. The idea of modifying the installer in a post build step was so that I only need to make one change ever. In an ideal world it would be nice if Microsoft addressed this issue but as I can't see this happening in my lifetime, I was hoping for a nice simple workaround!

Regards,

Phil
PhilB
 
Posts: 69
Joined: Fri Jul 06, 2007 4:13 pm

Re: Post Build Step

Postby mihai.petcu » Wed Feb 23, 2011 5:30 pm

Hi Phil,

Unfortunately, the post build workaround cannot be accomplished for the obvious reasons you mentioned in your first post.
I have discussed the issue with the development team and we added a post build improvement on our TODO list. The improvement will consist of an option that schedules the post build event after the MSI or after the EXE and it will be available in a future version of Advanced Installer. In the meantime, you can use the approach from my previous post.

Best,
Mihai
Mihai Petcu
Advanced Installer Team
http://www.advancedinstaller.com/
mihai.petcu
 
Posts: 3452
Joined: Thu Aug 05, 2010 8:01 am


Return to Common Problems

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 2 guests