Zsolt Kollarits
Posts: 409
Joined: Fri May 29, 2015 10:36 am

Properties are modified by the installer if using AI 13.6 (they are working in AI 13.4)

Dear Advanced Installer Support Team,

Please let me report a tricky problem for you which only happens when trying to install some EXE files generated by AI 13.6 or 13.7.

In our project we´re doing the following things:
1. At Install Parameters tab we created a new property called INSTALLDIR32 and gave it a default value of "C:\"
2. The real value of the INSTALLDIR32 should be set by a Custom Action called "Init_InstallDir32_Prop". This Custom Action has a condition of 'INSTALLDIR32~="C:\"', which means if the property still has it´s default value, the Custom Action will update it.
3. For testing purposes I put the INSTALLDIR32 property in a Path_Edit field at FolderDlg dialog of the installation wizzard.

The steps above are working fine, in the logfile - created by /L*Vx - we see that the Custom Action´s condition will be true, so it will get a proper value like C:\Program Files\Product. No problem so far.

BUT, if we add a Prerequisite to our .aip project - no matter what kind of prerequiste - the INSTALLDIR32 property is getting modified for some reason. In the logfile a new block appears almost in the beginning:

"
MSI (c) (C0:B0) [15:03:31:983]: Note: 1: 2205 2: 3: MultipleInstancesProps
MSI (c) (C0:B0) [15:03:31:983]: Note: 1: 2228 2: 3: MultipleInstancesProps 4: SELECT `PropertyValue` FROM `MultipleInstancesProps`
MSI (c) (C0:B0) [15:03:31:983]: Creating MSIHANDLE (1070) of type 790541 for thread 3504
MSI (c) (C0:B0) [15:03:31:983]: Creating MSIHANDLE (1071) of type 790540 for thread 3504
MSI (c) (C0:B0) [15:03:31:983]: Creating MSIHANDLE (1072) of type 790531 for thread 3504
MSI (c) (C0:B0) [15:03:31:983]: Closing MSIHANDLE (1072) of type 790531 for thread 3504
MSI (c) (C0:B0) [15:03:31:983]: Creating MSIHANDLE (1073) of type 790531 for thread 3504
MSI (c) (C0:B0) [15:03:31:983]: Closing MSIHANDLE (1073) of type 790531 for thread 3504
MSI (c) (C0:B0) [15:03:31:983]: Closing MSIHANDLE (1071) of type 790540 for thread 3504
MSI (c) (C0:B0) [15:03:31:983]: Closing MSIHANDLE (1070) of type 790541 for thread 3504
MSI (c) (C0:B0) [15:03:31:983]: Creating MSIHANDLE (1074) of type 790541 for thread 3504
MSI (c) (C0:B0) [15:03:31:983]: Closing MSIHANDLE (14) of type 790541 for thread 3504
MSI (c) (C0:B0) [15:03:31:983]: PROPERTY CHANGE: Modifying INSTALLDIR32 property. Its current value is 'C:\'. Its new value: 'C:'.
MSI (c) (C0:B0) [15:03:31:983]: PROPERTY CHANGE: Adding PRIMARYFOLDER property. Its value is 'APPDIR'.
MSI (c) (C0:B0) [15:03:31:983]: PROPERTY CHANGE: Adding AI_MISSING_PREREQS property. Its value is 'Microsoft Visual C++ 2010 x86 Redistributable'.
MSI (c) (C0:B0) [15:03:31:983]: PROPERTY CHANGE: Adding AI_BOOTSTRAPPER property. Its value is '1'.
MSI (c) (C0:B0) [15:03:31:983]: PROPERTY CHANGE: Adding AI_SETUPEXEPATH property. Its value is 'C:\Users\zsolt.kollarits\Desktop\TestApp.exe'.
MSI (c) (C0:B0) [15:03:31:983]: PROPERTY CHANGE: Adding SETUPEXEDIR property. Its value is 'C:\Users\zsolt.kollarits\Desktop\'.
MSI (c) (C0:B0) [15:03:31:983]: PROPERTY CHANGE: Adding EXE_CMD_LINE property. Its value is '/exenoupdates /L*VX log2.log '.
MSI (c) (C0:B0) [15:03:31:983]: PROPERTY CHANGE: Adding AI_IE_Ver property. Its value is '9'.
MSI (c) (C0:B0) [15:03:31:983]: PROPERTY CHANGE: Adding AIEXTERNALUI property. Its value is '5'.
"

In this block you can see that a line is saying that the value of INSTALLDIR32 has been changed from
'C:\'
to
'C:'
by something.

IMPORTANT: This block appears in MSI, only if a prerequisite is added to the project, which makes no sense at all. The prerequistie makes nothing with INSTALLDIR32, we don´t use that property on Prerequisties dialog at all. Actually the only difference we do in our sample project is that we add a single prerequisite and rebuild the EXE.

If we run the EXE WITHOUT a prerequisite -> the value of INSTALLDIR32 will remain 'C:\' -> the "Init_InstallDir32_Prop" Custom Action´s condition will be TRUE and it will run as expected.
If we run the EXE WITH a prerequisite -> the value of INSTALLDIR32 will be changed to 'C:' -> the "Init_InstallDir32_Prop" Custom Action´s condition will be FALSE and it will NOT run -> problem.

Could you please tell us why our private properties are modified at installation time if a prerequisite is added. We´d like to have full control over our properties and don´t want anything to change them from 'C:\' to 'C:'. I managed to reproduce this issue in a small sample .aip project, it was quite hard to figure out that the value of our properties are changed just because we define an arbitrary prerequisite at Prerequisites tab.

Please have a look at the project and perform the following steps:
1. Open the .aip project by AI 13.6 or 13.7.
2. Rebuild the EXE.
3. Install it on a PC with Windows Server 2012 64-bit PC. Make sure that the PC does not have Microsoft Visual C++ 2010 x86 Redistributable pre-installed.
4. Start the EXE you created at Step 2 on the PC and confirm that it installs Microsoft Visual C++ 2010 x86 Redistributable as a prerequisite.
5. Confirm that you see 'C:\' value in the second textbox of the FolderDlg dialog. -> This textbox contains the INSTALLDIR32 property, 'C:\' is a wrong value. The expected value is 'C:\Program Files (x86)\Therefore'

There are 2 ways of getting a proper value at Step 5:
1st option:
6. Repeat Step 1-5 by opening the .aip project by an older Advanced Installer, for example AI 13.4. Don't forget to remove Microsoft Visual C++ 2010 x86 Redistributable from your test PC.
7. Confirm that the second textbox at FolderDlg dialog DOES NOT contains 'C:\' but a proper value now.

2nd option:
8. Remove the prerequisite from the .aip project and rebuild the EXE by AI 13.6 or 13.7.
9. Install it on a PC with Windows Server 2012 64-bit PC. Don't forget to remove Microsoft Visual C++ 2010 x86 Redistributable from your PC.
10. Confirm that the second textbox at FolderDlg dialog DOES NOT contains 'C:\' but a proper value now.

Sorry for the long email, but it's hard to describe such a tricky problem.

Best regards,
Zsolt
Attachments
TestAppaip.aip
(22.91 KiB) Downloaded 408 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Properties are modified by the installer if using AI 13.6 (they are working in AI 13.4)

Hello Zsolt,

We'll start investigating your reported issue and as soon as we have a conclusion we'll get back to you.

Thank you for your patience and understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Properties are modified by the installer if using AI 13.6 (they are working in AI 13.4)

Hello Zsolt,

I've tested and replicated the behavior. This seems to be an Advanced Installer issue indeed. We'll try to add a fix for this issue in a future version of Advanced Installer, thank you for bringing this to our attention. As soon as the fix is available we will notify you on this thread.

Until then, I'm afraid I'm not aware of any workaround you can use for the moment in AI 13.7. Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Properties are modified by the installer if using AI 13.6 (they are working in AI 13.4)

Hello Zsolt,

Our development team has just closed this issue in our bug tracking system, but unfortunately they cannot add a fix for it. It seems this is how our Enhanced User Interface behaves with property-based folders. It simply deletes the trailing backslash to decrease the command line length.

Thank you for your understanding on this matter.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”