By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,621 Members | 1,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,621 IT Pros & Developers. It's quick & easy.

.NET Setup Project always adds desktop shortcut (checkbox always evaluates to 1)

P: n/a
I have developed a Windows application in Visual Studio .NET 2003 and
created a Setup project for it. In the File System Editor I have added
a shortcut to the User's Desktop folder to point to the application
once it has been installed. I have added a condition to the User's
Desktop named "DESKTOPSHORTCUT" (I have used several names, this is
just the latest). In the User interface, I have added a screen with a
checkbox that asks the user whether he/she wants to add a shortcut to
the desktop. The Property of the checkbox is "DESKTOPSHORTCUT" and the
checkbox is checked by default (I have also tried it as unchecked by
default).

When I run the installation, the application's Setup asks whether I
want to add a shortcut to the desktop and then it adds the shortcut
regardless of whether the checkbox is checked or not!

When I try to make the value of this custom property show up in one of
the dialogs that come after the one showing the checkbox (e.g. using
[DESKTOPSHORTCUT] in a text field dialog) I saw that the property
always evaluates to 1. That is why, clearly, my 'Condition' on the
'Desktop Folder' (namely "DESKTOPSHORTCUT=1") always evaluates to TRUE
and consequently the desktop shortcut is created always! -- There is no
'Condition' property on the shortcut itself, I hope this is not the
actual problem...

I have extensively combed through the documentation of creating a Setup
project and custom dialogs, but have been unable to find a solution. I
have, however, found a related discussion about that problem on the
Web, but no solution is provided there either:
"VS.NET always adds desktop application"
http://www.dotnet247.com/247referenc...57/285214.aspx


Has anyone else encountered this problem, too? How can I fix this?

Jun 2 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.