Why is it that the easiest tasks always produce the hardest bugs to solve? I created an application that needed to put a shortcut in the users SendTo menu upon installation. Problem is, no matter what I did, the shortcut never seemed to work. I could manually create one and that would work, but that defeats the purpose of the installer, right? After a lot of searching, I finally figured out what was going on and what needed to be changed. Simply put, there are two different types of Shortcuts. There is your normal shortcut and then there is an "Advertised" shortcut. I'm not sure what the difference is, but an advertised shortcut will not display in the SendTo menu. You would think that Visual Studio 2005 would create the correct type of shortcut when you picked SendTo. That would just be too easy, wouldn't it. So here's what you need to do to get your installer to create the correct type of shortcut:
- Download and install a copy of ORCA. Orca is a free tool from Microsoft. To get a copy, you need to download the Windows Installer SDK and install that. Once it's installed, you have to search around the SDK folders for the Orca Installer and then install that. Alternatively, just head on over to Aaron Stebner's Blog and get the Orca installer from there. The choice is up to you.
- Run Orca and open your install package.
- Locate the "Property" table on the left hand column and select it. The right side will now show all the different properties and their corresponding values.
- Add a property with a name of DISABLEADVTSHORTCUTS and a value of 1
- Save the changes and you're done.
As an alternate to number 3 and 4, you can edit some values in the Shortcut table but that's a lot more involved and I don't really see the point. If you want to take this approach, check out this post over at .NET 247 for details on the changes you need to make.
Now, if someone can just explain to me why the installer creates the wrong type of shortcut and has done so for such a long time. Oh, and I would also like to know how an advertised shortcut is different than a real shortcut. Oh well, somethings are better left unanswered, eh? ![Wink [;)]](/emoticons/emotion-5.gif)