Install Folder Based on OS Version - Advanced Installer Community

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!

jjreilly
Posts: 5
Joined: Wed Oct 17, 2012 4:30 pm

Install Folder Based on OS Version

We want to install our app in C:\Users\Public\Documents on Vista/Win 7/Win 8, and under program files on earlier OS. Furthermore, I do not want to allow the user to change the install folder on the newer OS, but that would be fine on XP. [UAC is causing issues with this project.] Can you suggest the proper design approach and features? I'm evaluating Pro for purchase.

Thanks.

-Reilly.
SoftWright, LLC.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install Folder Based on OS Version

Hello Reilly and welcome to Advanced Installer forums,

Thank you for your interest in Advanced Installer.
We want to install our app in C:\Users\Public\Documents on Vista/Win 7/Win 8, and under program files on earlier OS.
In order to achieve what you want you can proceed like this:
- Go to "Files and Folders" page and add your application files under "Application Folder" (APPDIR) folder.
- Go to "Custom Actions" page and add a "Set installer property" custom action with sequence, after "Wizard Dialogs Stage -> Searches" action group, like this:
  • Property: APPDIR
    Formatted: [PublicDocumentsFolder]
    Condition: VersionNT >= 600
- Select the above custom action and, while pressing the Shift key, drag it under "Install Execution Stage -> Searches" action group. From "Custom Action Properties" right pane enable the "Execute only once if present in both sequence tables" execution option.
- Build and run your project.

Also, you can take a look on our "Install resources based on the OS version" and "Folder Paths" articles.
"Furthermore, I do not want to allow the user to change the install foldr on the newer OS, but that would be fine on XP.
In order to achieve this you can proceed like this:
- Go to "Dialogs" page, select "FolderDlg" dialog and from its context menu choose "Show only if..." option.
- In the "Edit Condition Dialog" add the following condition:
  • Condition: VersionNT < 600
Also, please keep in mind that our "Dialog Editor" feature is available only in an "Enterprise" or above license.

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

Return to “Building Installers”