0

So I am trying to create an installer (using Microsoft Visual Studio 2015 Installer Projects), which prompts the user if he wants to have a desktop shortcut for the programm which is to be installed.

This is what i have done up till now.

  1. Navigated to the "Userface-Editor"
    enter image description here

  2. Rightclicked on Start -> Add a Dialog
    enter image description here

  3. Selected a Controll-Box-Dialog-Window
    enter image description here
  4. Edit the Properties to my needs
    enter image description here

The design for the window is now configured and ready to be deployed.

My question is how can i react, that the user ticks this box:

enter image description here
and set a Desktop Shortcut or do any other action I might implement later on.
Alternitevly, is there a simpler solution to this?

I am using Visual Studio 2015 Community Edition.

1 Answers1

0

In general, you would use a custom action with the condition CHECKBOXA1=1.

You might think that you could use CHECKBOXA1=1 as a condition on the actual shortcut you probably have in the IDE in the File System View (right-click the exe and create it, drag it to the destination folder) but that won't work. Conditions in Visual Studio setups are conditions on the internal component being installed, and the shortcut is in the same component as the file so it's always installed. That's why you'd need custom action code to create the shortcut (and remove it on uninstall).

At the risk of stating the obvious, Visual Studio setups aren't fully-featured with access to all the functionality of Windows Installer.

PhilDW
  • 20,260
  • 1
  • 18
  • 28