This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Custom Action Sequence of events ...
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 08, 2012
07:09 PM
Custom Action Sequence of events ...
Hi,
I can't figure out how to get my CA to execute in the correct order. I'm missing something really simple. My custom action takes [INSTALLDIR] as a parameter, and I have found that I have to call it not too early, or too late, or [INSALLDIR] is not aviable.
I have InstallFiles as default Sequence Number of 4000, and my custom action is 4825 in the Execute table. My CA is a VB .NET .DLL and is set for Immediate Excution after RegisterProgIdInfo which is sequence 4800. It is also set for 'Synchronous ignore exit code'. I need my CA to occur AFTER the files are installed in [INSTALLDIR]. For some reason, the order of events is RegisterProgIdInfo, my CA, then Install files - or 4800, 4825 then 4000. What gives?
Thanks ...:confused:
I can't figure out how to get my CA to execute in the correct order. I'm missing something really simple. My custom action takes [INSTALLDIR] as a parameter, and I have found that I have to call it not too early, or too late, or [INSALLDIR] is not aviable.
I have InstallFiles as default Sequence Number of 4000, and my custom action is 4825 in the Execute table. My CA is a VB .NET .DLL and is set for Immediate Excution after RegisterProgIdInfo which is sequence 4800. It is also set for 'Synchronous ignore exit code'. I need my CA to occur AFTER the files are installed in [INSTALLDIR]. For some reason, the order of events is RegisterProgIdInfo, my CA, then Install files - or 4800, 4825 then 4000. What gives?
Thanks ...:confused:
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 08, 2012
08:52 PM
INSTALLDIR ( and all other directory properties ) isn't set until after CostFinalize. However, for more comprehensive insight I suggest the following required reading:
Installation Phases and In-Script Execution Options for Custom Actions in Windows Installer
Installation Phases and In-Script Execution Options for Custom Actions in Windows Installer
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 09, 2012
12:42 PM
Thank you, I have a plan. I will store INSTALLDIR in a property and it will always be available, thus I can move my CA to the end of the application.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 09, 2012
02:24 PM
Hi Folks,
What I'm trying is not working. I need to wait until the files are on the hard drive, then I need to modfy a file. My .dll has dialogs for testing purposes.
I need to pass [INSTALLDIR] to my .DLL, but when I try this in execute sequence after InstallFiles [INSTALLDIR], and my other properties, are always blank. When I try in UI sequence, I get the correct [INSTALLDIR] path in 'Immediate Execution', but it executes before the files are copied. When I try 'commit execution', I get error 2762 that it can't write to the script record.
In short, I can get the right path before the files are written - this is useless. I can get a null path after the files are written - this is useless ... How can I get my custom action to execute after the files are written and to accept [INSTALLDIR] or my own custom property [INSTALLDIR_COPY]?
Thanks
What I'm trying is not working. I need to wait until the files are on the hard drive, then I need to modfy a file. My .dll has dialogs for testing purposes.
I need to pass [INSTALLDIR] to my .DLL, but when I try this in execute sequence after InstallFiles [INSTALLDIR], and my other properties, are always blank. When I try in UI sequence, I get the correct [INSTALLDIR] path in 'Immediate Execution', but it executes before the files are copied. When I try 'commit execution', I get error 2762 that it can't write to the script record.
In short, I can get the right path before the files are written - this is useless. I can get a null path after the files are written - this is useless ... How can I get my custom action to execute after the files are written and to accept [INSTALLDIR] or my own custom property [INSTALLDIR_COPY]?
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 09, 2012
05:34 PM
Deferred actions need some extra care to get property values using MsiGetProperty or Session.Property. Searching the world for "CustomActionData" will show the trick of it: see for example newish InstallTalk blog post http://blogs.flexerasoftware.com/installtalk/2011/06/it-wants-me-to-do-what-some-notes-on-customactiondata-in-installshield.html and ancient newsletter tip http://www.flexerasoftware.com/webdocuments/PDF/CustomActionData.pdf.