Avatar of dominicwong
dominicwong
 asked on

How to create two short-cuts in the Program Start-up menu to start the same program in different modes?

Hi experts
What I have is one program. I would like to give user an option either to (1) start the program in one mode, or to (2) start the *same* program but in a different mode.

I shall have two short-cuts in the Windows Programs menu. But how do I do it with .NET, VS2008, Installer project?

Thanks
Dominic
.NET ProgrammingC#Installation

Avatar of undefined
Last Comment
dominicwong

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Vadim Rapp

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
dominicwong

ASKER
It works perfectly. :)

Thanks Vadim for your prompt response and taking the screenshots for the clear illustration. I appreciate it!!

BTW, since some users are interested only the first mode while some are interested in both, is there any easy way to disable the creation of the 2nd shortcut from the Installer project?
dominicwong

ASKER
Thanks Vadim
Vadim Rapp

>  since some users are interested only the first mode while some are interested in both, is there any easy way to disable the creation of the 2nd shortcut from the Installer project?

This is possible with Windows Installer, but not with Setup and Deployment project in Visual Studio, which implements only a small subset of the most trivial features of Installer. The installation would include two so called "features", which would be selectable by the user (similar to how you select the features of Microsoft Office to install, if you choose custom installation); but for that you need either more capable MSI editor, or free ORCA or WiX plus intimate knowledge of MSI structure. WiX can be installed as an add-on to the same Visual Studio, but expect quite a learning curve.

Once the features are implemented (with a separate feature having the 2nd shortcut disabled by default), besides the selection by the user, you can create so called transform that enables the second feature, and deploy the installation with transform to one set of users, and without it to another.

There are also other interesting possibilities, such as installing the second feature (thus 2nd shortcut) only for the users who satisfy certain criteria, for example only those who already have another product installed. This is often used by product authors whose product includes, say , a Word macro - they install the macro only to those who have Word.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
dominicwong

ASKER
Thanks Vadim for your help. I appreciate it.
dominicwong

ASKER
I thought I'd closed it. I am closing it again.