Hello, to achieve this you can do an workaround. Here are the steps:
1. In "Dialogs" page:
1.1. right click on "InstallTypeDlg" dialog and select "Show only if.." option, the "Edit Condition" menu will show up.
1.2. in the "Expression" field type "NOT OLDPRODUCTS" and then click "OK"
These steps will make the "InstallTypeDlg" dialog visible only when no previous version of the product is already installed (first time install condition)
2. In "Custom Action" page:
2.1. add a "Preserve Install Type of the old version" custom action with sequence scheduled after "Wizard Dialogs Stage -> Searches" action group
2.2. select the above custom action and while keeping the "Shift" key pressed drag and drop it under "Install Execution Stage -> Searches" action group; this way the custom action will be shared between both execution stages
2.3. select the custom action and in the right pane under "Execution Stage Condition" section click on "Advanced execution scenarios..." hyperlink and select "Skip action in Install Execution Stage if executed in Dialogs Stage" option
2.4. create a "Set Installer Property" custom action with sequence scheduled after "Wizard Dialogs Stage -> Path Resolution" action group and share it under "Install Execution Stage -> Path Resolution" action group too
2.5. configure the above custom action like this:
- Property: AI_InstallPerUser
Value: 0
2.6 under "Dialogs Stage Condition" and "Execution Stage Condition" sections check only "Install" option and set "Condition" field to the following expression:
2.7. select the custom action and in the right pane under "Execution Stage Condition" section click on "Advanced execution scenarios..." hyperlink and select "Skip action in Install Execution Stage if executed in Dialogs Stage" option
2.8. create a "Call Function From Attched Native DLL" custom action with sequence scheduled after "Wizard Dialogs Stage -> Path Resolution" action group (right after the previous added "Set installer property" action) and share it under "Install Execution Stage -> Path Resolution" action group too; this custom action will call the "AI_AuthorSinglePackage" function from our "aicustact.dll" module (this is a DLL file installed by Advanced Installer in its installation folder, i.e. "C:\Program Files (x86)\Caphyon\Advanced Installer 13.7\custact\x86\aicustact.dll")
2.9. configure the above action like this:
- Attached DLL: C:\Program Files (x86)\Caphyon\Advanced Installer 13.7\custact\x86\aicustact.dll
Function: AI_AuthorSinglePackage
2.10 under "Dialogs Stage Condition" and "Execution Stage Condition" check only "Install" option for the above action
2.11. select the custom action and in the right pane under "Execution Stage Condition" section click on "Advanced execution scenarios..." hyperlink and select "Skip action in Install Execution Stage if executed in Dialogs Stage" option
Attached you can find a sample created with Advanced Installer 13.7 which implements this workaround. Please test this scenario thoroughly and make sure it works as you expected.
If there is anything else we can assist you with just let us know.
All the best,
Daniel
FOLLOW US
Get the latest news in Application Packaging