We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

sfaust
Posts: 57
Joined: Tue Oct 13, 2015 11:57 pm

Change folder path for 'just me' option

I have an installer built and I need to implement an option for 'just me' vs. 'everyone'. Since this is an addin to another software that I don't control I need a little different requirements. I need to not change the program files location but change from using 'Common Application Data' to 'Application Data' conditionally. Basically the only modification I want to make is if the user selects 'just me' that the files under common appdata would go to the same path under appdata. I didn't see a direct way to do this with the predefined folders so I created an install parameter named "ADDINFOLDER" that holds the folder location for the everyone option. Then I put an event on the InstallTypeDlg that changes it to the appdata location if only me is selected (or it's supposed to anyway). It is changing the path for the installed files, but it changes it every time like it's not respecting the condition. The event values are as follows (note that the path in the argument is temporary for testing, I will update it when i get this figured out).

Property: ADDINFOLDER
Argument: C:\WithChange
Condition: AI_INSTALL AND (ALLUSERS)

Note that I have also tried AI_InstallPerUser in place of ALLUSERS with no success, it still changes it every time and is always installed to C:\WithChange.

Help...
sfaust
Posts: 57
Joined: Tue Oct 13, 2015 11:57 pm

Re: Change folder path for 'just me' option

Ok I was able to solve this one myself, though part of it is a bit hackish.

Turns out you need to use the actual value in the condition even though it's true/false. So I changed my condition to AI_INSTALL AND (AI_InstallPerUser = "1") and that seems to work. However it still changes the default install path on my. I had to put another event on the next button to set the APPDIR variable back to it's original value and I also set MSIINSTALLPERUSER to 0 to make it still elevate the command prompt so it doesn't have permissions issues installing. The last part is ugly and yes the install system needs to be overhauled but it's working for now...

Return to “Building Installers”