Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Setup / February 2004

Tip: Looking for answers? Try searching our database.

MSI optionally creating shortcuts during installation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John O'Neill - 24 Feb 2004 11:52 GMT
Hi

I am using Visual Studio to create a Setup Project for a C# desktop
application. I want to offer the user the option to create shortcuts on the
desktop and in their programs menu rather than forcing them to be created. I
know that I can use the Condition property e.g. Condition CHECKBOXA1 = 1 to
conditionally install files but the Condition property does not seem to be
available for shortcuts.

Any help would be much appreciated.

John
Phil Wilson - 24 Feb 2004 18:31 GMT
The conditions in VS don't really apply to files. Strictly speaking they apply
to MSI components, and it turns out that VS has the shortcut to a file and the
file itself in the same MSI component, which is fine, except that it means you
can't separate installing the shortcut from installing its target. You probably
need a custom action (it can be VBScript using the WSHShell object. Article
244677 would be useful.
Signature

Phil Wilson [MVP Windows Installer]
----

> Hi
>
[quoted text clipped - 8 lines]
>
> John
John O'Neill - 25 Feb 2004 09:00 GMT
Thanks for your help Phil. You've given me enough information to resolve my
problem.

> The conditions in VS don't really apply to files. Strictly speaking they apply
> to MSI components, and it turns out that VS has the shortcut to a file and the
[quoted text clipped - 14 lines]
> >
> > John
Mike Wade [MSFT] - 27 Feb 2004 00:54 GMT
An alternative is to do something along the lines of what John did to begin with.  Except you should add two copies
of the file to your setup project.  Create a shortcut to one of the files.  Set the condition for that FILE to "CHECKBOXA1
= 1", and the condition to the other file as "CHECKBOXA1 = 0"

Signature

Mike Wade, VB Team
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------

>From: "Phil Wilson" <phil.wilson@unisys.spamcom>
>Subject: Re: MSI optionally creating shortcuts during installation
[quoted text clipped - 18 lines]
>>
>> John

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.