cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Conditionnally set the target to a shortcut

Hi,

I want to create a shortcut to an existing exe file on the file system.

On win95 machines, the exe is in [windowsfolder] while on nt/2000 machines the exe is in [systemfolder]

If I specify only the exe file as the shortcut target, without any path, the shortcut is not created. If I specify a path (i.e. [systemfolder]MyFile.exe), the shortcut is created.

Problem is the path need to be different depending on the system (win95 or nt/2000) I install the application...

How can I conditionnally set the target of the shortcut during installation?
(3) Replies
It is not possible to directly set up shortcut Target conditionally. Instead of setting the condition on shortcut, you can do that on component, and associate shortcut to it. Of course, you will need 2 shortcuts.
CChong
By Level 11 Flexeran
Level 11 Flexeran
Hello bertilh,

You can search the file (if already exist) using Signature, DirLocator and Appsearch tables. Use the Property set in AppSearch table as target of the Shortcut you create for the existing file. You don't need to create two component in this scenario.

Let me know if you need more help on this.
Thank you very much for your help. This works perfectly fine.

I used the Signature, DrLocator and AppSearch tables as you mentionned.

🙂