[APPDIR] mappings - 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!

vpodans
Posts: 35
Joined: Tue Dec 27, 2011 3:03 pm

[APPDIR] mappings

I've searched through this forum, but was unable to find a related topic.

My package installs additions (they are platform independant) for a built-in Windows application, that is available in both, x86 and x64 boxes. In order to support cross-platform installations, I've decided to use mixed 32/64-bit package. The problem is that I cannot resolve x64 native variables, like [CommonFiles64Folder], [ProgramFiles64Folder] on x86 machines.
For example, I create a new project and specify application path as: [CommonFilesFolder]\CustomFolder
On x86 platforms this path is correctly resolved to C:\Program Files\Common Files\CustomFolder.
On x64 platforms this path is resolved to C:\Program Files (x86)\Common Files\CustomFolder and this is not what I need. My goal is to install the package to native folder (say, C:\Program Files\Common Files\CustomFolder on either x86 or x64 machine).

If I specify [CommonFiles64Folder] or [ProgramFiles64Folder] in the application path, these variables are correctly resolved on x64 machines, but fails on x86 (they are translated to C:\APPDATA, because they doesn't exist on x86 machines).

The question sounds like this: is there a way to specify application folder depending on machine type? Say, map [APPDIR] to [CommonFilesFolder] on x86 machines and [CommonFiles64Folder] on x64?

thanks in advance!
®
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: [APPDIR] mappings

Hi,

By default Advanced Installer uses for mixed packages the property "AI_ProgramFiles" in Install Parameters, as target for "Application Folder". This should resolve always to "Program Files" if you launch the install from the EXE generated by Advanced Installer.

Using this property you can then append the rest of the folders either in Files and Folders page, create the folder hierarchy, or in Install Parameters by setting this:
[AI_ProgramFiles]Common Files\Custom Folder.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vpodans
Posts: 35
Joined: Tue Dec 27, 2011 3:03 pm

Re: [APPDIR] mappings

Thanks Bogdan! This works!
®
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: [APPDIR] mappings

Always a pleasure Vadims,

Best regards and a Happy New Year,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”