I created a VS 2003 deployment project and I've set it up the way I want, even with a custom installer class. At first I had shortcuts on the desktop and in the program files that were working. Now, the shortcuts will uninstall the program if you double click them. When looking at where they are pointed, they show the installation folder and not the executable. I've recreated the shorcuts and changed other things, but nothing helps. Does anyone have any ideas

Shortcut problems
Carltegeder
I will indeed try to set the registry key in the application itself if everything else fail, but I'm really curious to find a solution for this problem the "Microsoft" way :D
You can check your Application Event Viewer to find the exact problem of why your program keep repairing it's install (it'll tell you what's missing or broken).
I'll definitely let you know when I find a solution to mine.
DemonEyesKyo
I'm having the same problem.
My problem is: I have a registry entry - to have the program run at startup - that's set during the install process. In my application, user can opt to have this feature turned off (the program will then delete this registry entry). However, when that's done, the next time user launches the program through the shortcut item, the windows installer repair is launched (you can see the whole problem on the event viewer). This however is not happening when they launch the program directly (by launching the .exe file)
So I know where it all occured, just not sure how to fix it (to make the shortcut ignore the existance of this registry entry.
The closest solution I have on this is from the MSDN chat forum: http://msdn.microsoft.com/chats/transcripts/windows/windows_060503.aspx
"....do not make these resources key paths of any components"
I don't understand what that means :) Does that mean I can't refer to that registry entry on my code anywhere
Any input will be appreciated.
LucaTarrini
Saranga Amarasinghe
Hopefully I can shed some light on what is happening and the issues you are seeing.
Visual Studio creates advertised shortcuts. What these do is check on the condition of the application (all the files are there and all of the registry entries are there) when you launch the app through the shortcut.
I think that explains all of the behavior you are seeing.
Now to work around it there are several things you can do.
Edit the built MSI using ORCA, it is a tool included with the Windows Installer SDK. In the shortcut table change the Target from "DEFAULTFEATURE" to probably
"[TARGETFOLDER]\<name of your app>" This will create a regular shortcut rather then an advertised one.
If you know where the app is going to be installed you can create a regular shortcut to that path. Change its extension (VS will resolve shortcuts to actual files) then add it to the setup project finally change its target name back to the correct extension ".lnk"
If you wanted to add a registry entry that will be changed but still retain the benefits of advertised shortcuts you could create the reg key on first run as was suggested or during a custom action.
I hope that clears up what is happening and gives you a way to solve your problems.
Haitashi
Hallelujah! I found that my startup module that I was using to handle command line parameters was the problem. So I removed it and set the default startup object to a form AND I had to rebuilt the entire solution, copying the source code to it.
I hope that you find a solution to your problem Summer.
Ajish M
I figured out how to do this without manually editing the .msi
This same question was asked in several different threads so I put the answer in a central plase here:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1221084&SiteID=1&mode=1
Jacob Wagner
Sr. IT Technician
American River College
wagnerjp AT arc DOT losrios DOT edu
Keessie
Will this also help with a shortcut that I added to the Start - Programs - Application folder of my msi Instead of creating a shortcut normal shortcut it created one with a target that can not be changed. This target does not point to the application directory. The program will not start correctly because my VB application has a connection that points to an ini file. This ini file is in the application directory.
Thank you.
Archana G
As for my situation,
This is my new hypothesis:
The problem is with the primary output of the project that I am installing.
These are my reasons:
- It links to the output folder and not any one specific file.
- I've created multiple new deployment projects using all the default values and any combination I thought worth trying and ALL of them failed at creating a shorcut to the primary output of my project.
Maybe the actual problem is having the deployment project in the same solutionI am using a custom installer class from the same project that it is installing. Maybe this is the problem. Are you using a custom installer class