View Full Version : Conditionnally set the target to a shortcut

07-16-2002, 03:12 AM

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?

07-16-2002, 10:42 AM
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.

07-16-2002, 12:57 PM
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.

07-17-2002, 01:19 AM
Thank you very much for your help. This works perfectly fine.

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