Solved

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

Posted on 2016-08-22
6
70 Views
Last Modified: 2016-08-29
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
0
Comment
Question by:dominicwong
  • 4
  • 2
6 Comments
 
LVL 40

Accepted Solution

by:
Vadim Rapp earned 500 total points
ID: 41766198
create first shortcut (you will probably have Project Output rather than Notepad)
create shortcut
create second shortcut
create another shortcut
specify Arguments for the first shortcut
specify parameter for the first shortcut
specify different Arguments for the second shortcut
specify parameter for the second shortcut
move 1st shortcut to Programs Menu
move first shortcut to start menu
move 2nd shortcut to Programs Menu
move second shortcut to start menu
1
 

Author Comment

by:dominicwong
ID: 41766301
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?
0
 

Author Comment

by:dominicwong
ID: 41771237
Thanks Vadim
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 41773014
>  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.
0
 

Author Comment

by:dominicwong
ID: 41775763
Thanks Vadim for your help. I appreciate it.
0
 

Author Closing Comment

by:dominicwong
ID: 41775764
I thought I'd closed it. I am closing it again.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now