AI_SetMsiProperty is only working for known properties - Advanced Installer Community
iske
Posts: 11
Joined: Tue May 03, 2016 3:07 pm

AI_SetMsiProperty is only working for known properties

Hey Advanced Installer team,
I've noticed a bug (or maybe a strange behavior) in the last days. I wrote an custom action script (inline powershell) to search for existing installations (that were not installed with Advanced Installer).
The powershell script searches for configuration parameters of the old existing installation. The plan is to pass these parameters with MSI properties into the further installation progress. Therefore I used the powershell command AI_SetMsiProperty. Inside the installation log I see loggings like

Code: Select all

Adding OLD_INSTALL_EXISTING property. Its value is 'true'
Until this point everything works well. The problem is, I could only access this MSI properties for dialog conditions. When I try to access the MSI properties for conditions of custom actions later in the installation progress (after the files have been installed), AdvancedInstaller acts like these properties does not exists. To solve this problem, I had to insert all MSI properties as properties under "Install Parameters". But then I have to give the values, as the value field cannot be empty. I had to insert a "dummy empty value" ( "{}" ). That has the consequence that I had to write all conditions like "OLD_INSTALL_EXISTING <> "{}".
Is there a way to add MSI properties via powershell, which remain the entire installation process?
Greetings, André
Last edited by iske on Wed Oct 26, 2016 7:53 am, edited 1 time in total.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: AI_SetMsiProperty is only working for known properties

Hi André,

Please keep in mind that this is the normal behavior. The properties that do not exist in the "Property" table at build time are not passed from the UI sequence to the Install sequence. In this case, you can either use the workaround you described or run your powershell script on the Install sequence of your package.

Just let me know if you have any other questions.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
iske
Posts: 11
Joined: Tue May 03, 2016 3:07 pm

Re: AI_SetMsiProperty is only working for known properties

Hey Eusebiu,
thanks for your reply. Okay then I have to use my workaround, because I need the information out of these properties during the UI sequence.
Regards André
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: AI_SetMsiProperty is only working for known properties

You're welcome André.

Just let me know if there is anything else that I can help you with.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”