Same-named file to Application Folder for 64/32 bit? - 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!

Peter350
Posts: 30
Joined: Sat Oct 17, 2009 1:56 pm

Same-named file to Application Folder for 64/32 bit?

How to target same file to Application Folder for 64/32 bit?

I have a project mostly consisting of .NET assemblies which run ANYCPU. They are correctly installing to the Application Folder on the target machine.

The problem is a single platform-specific DLL. I have two versions of the DLL, both with the same name. I wish to install either the 64 or 32 bit version of the DLL, with the same name, to Application Folder.

Currently I seem unable to do this. The project wizard has created a folder APPDIR/32-bit and puts the 32-bit file in there. I do not wish it there. I wish it to be in the APPDIR.

I have been unable to add two files under "Files & Folders - Application Folder" targeting the same location with the same name.

I have tried under Organization labelling them VersionNT64/NOT VersionNT64 which works i.e. the correct file is installed on either 32-bit or 64 bit installations.

The only problem is the target location. How would I make the 32-bit DLL be placed in APPDIR instead of APPDIR 32-bit?

Should I install a custom action to copy it from APPDIR/32-bit to APPDIR after the installation or is there an easier way?

Many thanks
Peter350
Posts: 30
Joined: Sat Oct 17, 2009 1:56 pm

Re: Same-named file to Application Folder for 64/32 bit?

I may have found a solution to this problem and would be grateful for any explanation on this:

I created a new project mixed 32/64 bit (just installing two identically named files) and noted in the wizard that whilst there is a 32-bit folder, it says that by default those files will be installed in Application Folder on a 32-bit platform. It seems to work.

I compared my new project to my project with the problem.

Under Organization, the root notes 32-bit and 64-bit, under General: Directory: have a grayed out field for the Directory. It was APPDIR on the test project but on the problem project it was blank.

Clicking on the ... browse and entering APPDIR in this field seems that it may have solved the problem.

Is that the default directory which is reverted to on a 32-bit platform (instead of the "32-bit" folder?)
Peter350
Posts: 30
Joined: Sat Oct 17, 2009 1:56 pm

Re: Same-named file to Application Folder for 64/32 bit?

The problem has returned intermittently for 32-bit installs. Sometimes I get a clean installation in the APPDIR folder, but other times it creates the folder APPDIR/32-BIT and uses that instead.

I have checked that in "Product 32-Bit -> General -> Directory" still says APPDIR and it does.

I have tried repeatedly installing the first version, then installing the second. Sometimes the second works fine (all files go to APPDIR) but randomly the second installation creates the "32-bit" folder.

Please explain what is the mechanism which causes the installer to NOT create the "32-bit" folder on 32-bit machines, and instead to use the APPDIR folder for these files?
Peter350
Posts: 30
Joined: Sat Oct 17, 2009 1:56 pm

Re: Same-named file to Application Folder for 64/32 bit?

More information:

It seems that the switches /quiet or /passive are causing the problem.

Running without command line switches seems to work perfectly.

I assume that the relocation of the files from "32-bit" to APPDIR, is happening in the UI phase of the installer, and that it is behaving differently when run /quiet

??
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Same-named file to Application Folder for 64/32 bit?

Hi Peter,

Please send your .aip project file to support at advancedinstaller dot com so we can investigate the issue.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Peter350
Posts: 30
Joined: Sat Oct 17, 2009 1:56 pm

Re: Same-named file to Application Folder for 64/32 bit?

Thanks, have emailed the sample project as requested.

For anyone wishing to reproduce this, simply start create AI project in mixed 64/32 bit mode and include a file for 32-bit installation to install into the standard APPDIR.

Run the installer from the command line on a 32-bit XP machine, with /quiet and the file is moved into a "32-bit" directory which is incorrect behaviour.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Same-named file to Application Folder for 64/32 bit?

Hi Peter,

This is indeed an issue with quiet installs. Thank you for bringing this to our attention.
I have added an improvement on our TODO list and it will be available in a future version of Advanced Installer.

In the meantime you can conditionally install the file using the approach described in our tutorial on how to conditionally install a file based on the operating system.

Make sure you recreate the folder and add its contents in your project in order to avoid the bug. Working with the same folder might cause issues.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”