Conditional Installation feature in Setup project does not work .N

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.

It appears that the "condition" feature does not always work in a "Setup and
Deployment Project" (e.g. Setup program) created by VS.NET 2003. It seems to
work for files in the "Application Folder" (e.g. "File System (Setup)" part
of deployment project), but not for folders I have created in the "User's
Programs Menu". It seems to ignore the condition setting and always install.
Specifically, I have added a custom dialog box to my installer, per the
article:

http://msdn.microsoft.com/library/d...l/vxconRadioButtonsUserInterfaceDialogBox.asp

I then refer to the Radiobuttons in the "Condition" part of the "File
Installation Properties". Again, when I do this for a file in the
"Application Folder", it works properly. When I set the same Condition
property to the same setting for a folder underneath the "User's Programs
Menu", it ignores the setting and always installs the folder and shortcuts
within the folder.

I need to selectively install shortcuts to the application program, based on
what the operator chooses in a RadioButton dialog box. Each shortcut uses
different command line parameters to my application, that's why I need
different shortcuts.

Also, how do I selectively install shortcuts on the "User's Desktop"? There
isn't a "Condition" property for an application shortcut in the "User's
Desktop" folder.

Thank you
 
Those conditions can be misleading. It's not that the condition on a folder
doesn't work, but that Windows Installer doesn't let you have a condition on
a folder, so the IDE is offering you a choice that doesn't exist. The
condition is on a Windows Installer component, and the component is the
vehicle to install the file. See the condition here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/component_table.asp
That doesn't solve your problem, sorry, but does explain it I hope.

The situation with the conditional shortcut is similar VS generates MSI file
with the file and its shortcut in the same installer component, so it can't
install one without the other. A custom action conditioned on the button
could be used to create a shortcut.
 
Back
Top