prerak6962
Posts: 112
Joined: Mon Dec 08, 2014 5:26 pm

APPDIR modified after FolderDlg

Hello,

In the installer of one of my products, the "APPDIR" property is getting modified on it's own after the "FolderDlg".
I have the following logs:
SI (c) (5C!F8) [14:40:01:133]: Doing action: AI_SETMIXINSTLOCATION
Action 14:40:01: AI_SETMIXINSTLOCATION.
Action start 14:40:01: AI_SETMIXINSTLOCATION.
Action ended 14:40:01: AI_SETMIXINSTLOCATION. Return value 1.
MSI (c) (5C!F8) [14:40:01:133]: PROPERTY CHANGE: Deleting APPDIR property. Its current value is 'C:\Program Files\ZeeTim\ZeePrint Server\'.
MSI (c) (5C!F8) [14:40:01:133]: Doing action: AI_RESTORE_LOCATION
Action 14:40:01: AI_RESTORE_LOCATION.
Action start 14:40:01: AI_RESTORE_LOCATION.
MSI (c) (5C:3C) [14:40:01:196]: Invoking remote custom action. DLL: C:\Users\ADM-PR~1\AppData\Local\Temp\MSID32C.tmp, Entrypoint: RestoreLocation
Action ended 14:40:01: AI_RESTORE_LOCATION. Return value 1.
MSI (c) (5C!F8) [14:40:01:212]: PROPERTY CHANGE: Adding APPDIR property. Its value is 'C:\Users\adm-prerak\AppData\Local\Programs\ZeeTim\ZeePrint Server'.
As you can see, the property is deleted and added again with the different path. The application folder is set to "[ProgramFiles64Folder][Manufacturer]\[ProductName]" and I would like to keep it the same. Also, the installer was executed as an admin and still the path was changed to the user directory.

Any idea why is this happening?
I have attached an .aip file that can reproduce the issue.

Testing scenario:
- WIndows Server 2019
- Advanced Installer Version 16.8 (E467B907)

Thank you.
Prerak
Attachments
APPDIR_test.aip
(107.56 KiB) Downloaded 209 times
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: APPDIR modified after FolderDlg

Hello Prerak,

From what I can see in your .AIP file, you are using the "InstallTypeDlg".

Please keep in mind that this dialog is meant to be used with an installation type of "Per machine if user is administrator, per user otherwise".

Basically, you took this dialog and simply changed the radio button names. Please keep in mind that this is a predefined dialog of ours and it has some custom logic behind it.

Your APPDIR resets after either choosing "Demo" or "Full", because the AI_AuthorSinglePackage is executed, whose purpose is to delete APPDIR and set it based on the AI_InstallPerUser property. Since this property does not exist in this case, the value is set to LocalAppData folder.

To avoid such behavior, please create your own custom dialog and replace the one from your project with it.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
prerak6962
Posts: 112
Joined: Mon Dec 08, 2014 5:26 pm

Re: APPDIR modified after FolderDlg

Hi Catalin,

Yes, I no longer see the issue after replacing with a new dialog.

Thank you once again for the guidance... :)
Prerak
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: APPDIR modified after FolderDlg

You are always welcome, Prerak!

I am glad you got this working.

Best regards,
Catalin :D
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”