- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsDear experts,
I've had trouble with adding shortcuts in a Setup Project for one of my solutions in Visual Studio 2008. The shortcuts would start the instal each and every time a user clicked on them.
After comparing a few tutorials on making Setup Projects I've discovered others did 2 things differently than me:
1) They added the .exe as a file versus adding primary output like I did;
2) they added it to the 'application folder' versus placing it in the 'program files' folder lioke I did.
I mimicked their behaviour and... it worked. The shortcuts didn't started installing again. I have picked up here and there as to exactly why this is. It has something to do with user specific settings.
BUT... can anyone explain to me please exactly why this worked? I want to know more about setup and deployment because it's important for my work. I feel a bit like I'm stumbling in the dark here.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: vadimrapp1Posted on 2009-08-20 at 11:01:30ID: 25145399
While I can't explain why it happened in that particular case, I can explain how it actually works (in simplified form).
rticle3.ht m
What you saw was so called self-repair. Self-repair is initiated when the user clicks on advertised shortcut. Since shortcut is advertised (you can tell one by looking at its properties - many will be disabled, unlike in the regular shortcut), the system before actually launching the exe checks the integrity of the installed product. If it finds that the integrity is violated, then it launches Installer to repair the installation.
The integrity, in turn, is described in the installation by designating its certain pieces as "keys". Those pieces can be registry entries or files. So, if any of those designated keys or files are missing, then the system launches Installer to repair.
You can find out what exactly was missing by looking in the event log. During this process, Installer usually creates two records, and one of them usually tells exactly which file or key is missing. If you find that, then you have to find out how it is deleted. Very often this is due to mistake of the installation author who marks as key something that is expected to be deleted by the application. I saw this even in Microsoft-authored installations.
Quite likely, when you specified the file rather than project output, the shortcut was created as non-advertised. Then there's no checking and thus no self-repair.
If you really want to find out what happened, the starting point is event log.
You can also find more details in my article at http://www.vadimrapp.com/a