Mioszek
Posts: 1
Joined: Fri May 05, 2023 9:42 am

Per-user and per-machine installation in different folders

Hi,
I want to add an per-user and per-machine installation type to my Advanced Installer project. However default installation location is [AI_UserProgramFiles] which resolves to ProgramFiles in per-machine and LocalAppData in per-user installations. This does not work, because my application downloads libs with Maven and saves temporary files, so I need non-administrative users to be able to modify contents of the per-machine location folder.

I thought ProgramData might be a good place, so I changed ApplicationFolder to [CommonAppDataFolder], but now the application is installed in ProgramData folder in both types (per-user and per-machine), which I do not think is right. What folder should I use?

Thank you in advance for the help :)
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Per-user and per-machine installation in different folders

Hello and welcome to our forums,

If you want to always install to ProgramData when the user selects "per-user", then most likely the best ideea is to schedule an event on the "Next" button from the "InstallTypeDlg" that sets APPDIR to "ProgramData"

Hope this helps!

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

Return to “Common Problems”