ves2006
Posts: 11
Joined: Tue Jan 09, 2007 2:16 pm

Conditional shortcut

Hi,
I need to create additional shortcut if the client is using 64-bit Windows.
To achieve this goal I've done the following:
1. I've created dummy registry value in order to create new component
2. I've created the shortcut and moved it to the new component.
3. I've created new feature with condition VersionNT64 and moved the component to this feature. The install level of the feature is 1 (typical) and "Setup Type" dialog is not added to the project.
I've tested the installation on 64-bit Vista, but the shortcut is missing.
Am I missing something?

Regards,
Vladislav
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Note that you can condition the shortcut component directly by using the "..." button next to the "Condition" textbox in the "Component Properties" page.

However, if you use a feature for the shortcut, then for that feature you set the install level to 0. In the "Conditional..." menu you create this condition:

Code: Select all

__Condition__|__Level__
 VersionNT64 |    1
Regards,
cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
ves2006
Posts: 11
Joined: Tue Jan 09, 2007 2:16 pm

Hi,
thanks for you answer.
I followed your hints, but without luck. Then I removed the condition and tried again. The result was the same.
Obviously the problem is not in the condition, but in the shortcut itself. I'm trying to create a shortcut to Windows Explorer (explorer.exe). I've created it as a shortcut to external file. The shortcut target is System64Folder\explorer.exe.

Regards,
Vladislav
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

The syntax you are using for the shortcut target is not correct. In order to create a shortcut to Windows Explorer in a 64 bit Windows your shortcut path must be:

Code: Select all

[System64Folder]explorer.exe
Also note that if the target for the shortcut does not exist, the shortcut will not be created.

Regards,
cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”