Windows Installer and conditions

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.
 
F

Family Tree Mike

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
 
J

Jeff Johnson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top