Windows Installer and conditions

  • Thread starter Thread starter Jeff Johnson
  • Start date Start date
J

Jeff Johnson

Is VS 2005, using a standard Setup project, is there no way to apply a
condition to a shortcut? Files have a Condition property that can be used to
control whether or not to install the file, but shortcuts lack this. I'm
trying to be a good citizen and ask the user whether he wants a desktop
shortcut or not (because I HATE it when apps slap an icon on my desktop
unbidden) but I can't find an obvious way to do it.
 
Jeff Johnson said:
Is VS 2005, using a standard Setup project, is there no way to apply a
condition to a shortcut? Files have a Condition property that can be used to
control whether or not to install the file, but shortcuts lack this. I'm
trying to be a good citizen and ask the user whether he wants a desktop
shortcut or not (because I HATE it when apps slap an icon on my desktop
unbidden) but I can't find an obvious way to do it.

There is a condition property on the User's Desktop folder, in the File
System View. I have not tried it but I suspect that is where you put the
condition. It would be an all or nothing condition though, if you have
multiple shortcuts.

Mike
 
There is a condition property on the User's Desktop folder, in the File
System View. I have not tried it but I suspect that is where you put the
condition. It would be an all or nothing condition though, if you have
multiple shortcuts.

Sounds good in theory, but check out this fun tibdit from MSDN:
Conditions apply to files and components, not to folders. You can set a
condition on a folder, but the condition will be ignored unless the folder
is empty and its AlwaysCreate property is set to True. In this case, a dummy
component will be created for the folder and the condition will be set on
that component.
 
Back
Top