baruchi
Posts: 15
Joined: Tue Aug 25, 2020 7:51 pm

Application path in folder dialog keeps showing program files (x86) path

Fri Aug 27, 2021 8:12 pm

I created an installer where I am selecting, by default a folder under "program files (x86)", e.g. "program files (x86)/myApp".
The default folder is selected according to one of the examples I saw in the forum:
I created a registry search parameters and name it mySearch. I defined the search value as containing a path to a folder.
I defined, in the Application folder [mySearch].

When I run the installer the the default directory is show in the FolderDlg as expected.
The Problem:
If I browse for a different folder, uder "program files" (not (x86), using the browse button in the FolderDlg and select a folder in "program files", e.g. I browse and select:
"c:/program files/myTestFolder" and I click ok, the path show is: "c:/program files (x86)/myTestFolder"
Only when browse and select again the same folder, under "program files" it shows: "c:/program files/myTestFolder"

However it will still install to "c:/program files (x86)/myTestFolder" (not program files)

If I select e.g. "c:/program files/koko", it wil lbe installed to:
c:/program files (x86)/koko

In the Files and Folder options, teh files are installed to "Application Folder"
Why is that and how can i fix this?
Last edited by baruchi on Sat Aug 28, 2021 12:26 pm, edited 2 times in total.

baruchi
Posts: 15
Joined: Tue Aug 25, 2020 7:51 pm

Re: Application path in folder dialog keeps showing program files (x86) path

Fri Aug 27, 2021 8:37 pm

I also want to mention that the installer I am creating is for another application plugin.
That other application has both x32 and x64 version thus it can be installed on "program files" or "program files (x86)" and the user should be able to select it.

Catalin
Posts: 6511
Joined: Wed Jun 13, 2018 7:49 am

Re: Application path in folder dialog keeps showing program files (x86) path

Fri Sep 03, 2021 3:50 pm

Hello,

That is happening due to a phenomenon called "file redirection". A 32-bit process will always write, on a 64-bit machine, to the 32-bit location.

In our case, this is happening because your installer has the "Package type" of "32-bit package" (in "Install Parameters" page).

You can find more information about this in the following article:

File System Redirector
That other application has both x32 and x64 version thus it can be installed on "program files" or "program files (x86)" and the user should be able to select it.
For this, please have a look over the following article:

How-to for configuring mixed 32/64-bit packages.

Hope this helps!

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

Return to “Common Problems”