king_kobra
Posts: 8
Joined: Tue Feb 20, 2007 12:06 am

Installed Custom Action Running Before Files Copied

Thu Aug 07, 2008 7:56 pm

I have an .exe included in my app dir and I am trying to use it during an installed custom action during the InstallServices sequence. I have it set to immediate execution, sychronus and check return code. The problem seems to be that the action is called before the files are copied to the application dir. This confuses me since InstallServices happens much later than install files.

Thank you.

king_kobra
Posts: 8
Joined: Tue Feb 20, 2007 12:06 am

Re: Installed Custom Action Running Before Files Copied

Thu Aug 07, 2008 8:53 pm

Setting it to deffered seems to work. Not quite sure why but it does.

Thanks.

Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact:  Website

Re: Installed Custom Action Running Before Files Copied

Mon Aug 11, 2008 4:50 pm

Hi,
Setting it to deffered seems to work. Not quite sure why but it does.
This is because Windows Installer processes the InstallExecuteSequence (the segment between InstallInitialize and InstallFinalize) in 2 phases: first it creates an installation script by going through each action (standard or custom) and then it goes through the script and performs the actual installation.

In the first phase, only Immediate Custom Actions are executed, and in the second (deferred phase) the system is modified (files are installed, registry entries are created and also any Deferred Custom Actions are executed).

Hope this helps.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”