shunziker
Posts: 11
Joined: Tue Mar 27, 2012 1:57 pm

Place shortcut into program files 64 folder

Hi

I have a 32bit application which contains an Excel add-in (.xla) stored in the APPDIR. To use it in Excel I place a shortcut to this .xla into the Program Files/Microsoft Office/Office14/XLSTART directory. This works good for 32bit Excel. To address 64bit Excel I added the shortcut to Program Files 64/Microsoft Office/Office14/XLSTART, but the shortcut is still placed in the Program files (x86) folder. How can I instruct the installer to place it into the program files 64 directory?

thanks in advance and kind regards
Stefan
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Place shortcut into program files 64 folder

Hi Stefan,
How can I instruct the installer to place it into the program files 64 directory?
You can enable the file's component with "64-bit Component" from the Organization Page. Press F8 while the file is selected in the Files and Folders page.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shunziker
Posts: 11
Joined: Tue Mar 27, 2012 1:57 pm

Re: Place shortcut into program files 64 folder

Hi Mihai

thanks for your hint but it doesn't work, the shortcut is still placed in the x86 program files.

Maybe our application is a bit special: The application is VB6, so 32bit only. It uses a .net dll with COM Interop, this dll is placed in the program files x86 dir together with the app. Then there is an Excel Add-in (*.xla) which also uses the .net dll. So, all this is placed together with the app in program files x86. To activate the add-in in Excel, we don't use the Excel add-in Manager, but we place a shortcut to the *.xla in Excel XLSTART directory. So, if a user has Office 64bit installed, this shortcut has to be placed into program files/Microsoft Office/Office14/XLSTART directory, even if it points to a file placed in x86 program files. Now, how can I achieve this with AI?

kind regards
Stefan
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Place shortcut into program files 64 folder

Hello Stefan,

In this case, you can try using the approach described in How do I install different files based on the Operating System (32/64-bit)? user guide article.
Since you're trying to condition the installation of a shortcut, you should also keep in mind the How do I create a shortcut only if a specific feature is installed? article.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shunziker
Posts: 11
Joined: Tue Mar 27, 2012 1:57 pm

Re: Place shortcut into program files 64 folder

Hello Mihai

I don't understand your advice yet. We don't have a real mixed installation where we have either a 64bit or a 32bit exe and then the respective shorcut. Our application is always under 32bit because it is not 64bit capable, but it uses a 64bit capable dll which is also used by the Excel add-in placed in the 32bit program folder. But the shortcut has to be placed in the 64bit Office folder if Excel is installed as 64bit. I don't see how I could do that with the links you have sent me.

kind regards
Stefan
shunziker
Posts: 11
Joined: Tue Mar 27, 2012 1:57 pm

Re: Place shortcut into program files 64 folder

Hello Mihai

I know tried to solve this with a vbscript in a custom action. But here I have the following problem: On a 64bit Windows the property "ProgramFiles64Folder" resolves to "C:\Program Files (x86)" but the property "CommonFiles64Folder" resolves correctly to "C:\Program Files\Common Files". Could you explain this?

regards, Stefan
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Place shortcut into program files 64 folder

Hello Stefan,

I have attached a sample installer which demonstrates how you can achieve this.
For Stefan.zip
(3.22 KiB) Downloaded 557 times
It installs a file in Program Files(x86) and Program Files on a x64 machine.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shunziker
Posts: 11
Joined: Tue Mar 27, 2012 1:57 pm

Re: Place shortcut into program files 64 folder

Hello Mihai

thank you for the demo project. It works and I understand that I have to build a mixed 32/64bit installer to achieve this. But what I still don't understand: Why does the property "ProgramFiles64Folder" resolves to "C:\Program Files (x86)" while the property "CommonFiles64Folder" resolves "correctly" to "C:\Program Files\Common Files"?

Kind regards
Stefan
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Place shortcut into program files 64 folder

Hello Stefan,

That's not possible, I just tested those folder values and they are resolved as described in the following user guide article:
Advanced Installer Package Types

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”