469,639 Members | 1,583 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,639 developers. It's quick & easy.

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

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
0 2016

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by I_AM_DON_AND_YOU? | last post: by
3 posts views Thread by John | last post: by
3 posts views Thread by Michael D. Murphy | last post: by
4 posts views Thread by Joe | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.