简体   繁体   中英

Visual Studio Deployment Project Optional Desktop Shortcut

Hi I'm trying to get an optional desktop shortcut integrated with a VS2010 deployment project. I'm at the part where I have set added a shortcut to the "User's Desktop" of the TargetMachine file system, and I have set up a Checkboxes Dialog in the User Interface. How do you get the Checkbox1Property to transfer over as a conditional for creating a shortcut to the desktop? I don't see any options to add a conditional statement that can link the Checkbox1Property when I view the property for the shortcut in the targetmachine file system. The shortcut is always created as of now.

Thanks

For a complete understanding of this, I'd recommend reading:

http://www.codeproject.com/KB/install/vsSetupCustomDialogs.aspx

In short, you've already added the shortcut and created a new dialog window from the "View" -> "User Interface". All that's left is setting the condition property. You can't change this property of the shortcut itself, but you can change it for "User's Desktop".

For that condition you might want: CHECKBOXA1=1 which means the item is created/activated only if the CHECKBOXA1 is checked. 0 for unchecked.

A reference to conditional syntax is here:

http://msdn.microsoft.com/en-us/library/aa368012.aspx

EDIT : I just tested this and it looks like the Visual Studio installer is pretty unintuitive. The answer I provided doesn't work. You have to go about this is an ass-backawards way. This article better describes the process than I can: How do I specify Visual Studio Installer Conditions?

Overall, the Visual Studio installer is intended for fairly vanilla installs. It can do a LOT more, but it's cumbersome to do so. You can even have custom actions run during the installation (ie: run your own executables). The Visual Studio installer is included with VS 2010, but it will be removed in favor of InstallShield LE in future version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM