views:

428

answers:

2

I have the following situation:

  1. Installed my application using ordinary .msi
  2. Run the application from the start menu
  3. Right click on the icon in the task bar and pin it.

Now, I can use the pinned item/short cut to start my application but after I update my app using another .msi file, clicking on the pinned item shows this error:

'Problem with shortcut' - The parameter is incorrect.

I have checked the short cut and as far as I can see it points to the same directory/file as the previous version. (the new version has the same files/location). I assume that there is some versioning/Program Files magic happening that causes this issue but haven't found any good information on the net.

Some more information:

  1. The application is written in C# .NET 3.5 SP1
  2. The msi is created using a Setup Project in Visual Studio 2008 SP1
  3. I use a custom build tool to integrate the msi build and set the ProductCode and PackageCode to a new GUID for every version.
  4. The update seems to work fine otherwise. The old version is uninstalled, the new one installed correctly.

Anyone got a clue?

+2  A: 

My guess is the default Application ID is changing. If you intend to update this app with msi's regularly once it's "in the wild" then set your own Application ID. If this is a one time thing, then just unpin and repin it and carry on as normal.

Setting the Application ID is easy if you're using the Windows API Code Pack. Are you?

Kate

Kate Gregory
Thanks! I didn't know that I have to set an Application ID - Will give it a try.
Patrick Klug
Thanks (+1), I had the same problem and setting the Application ID solves it.
Marc
Shouldn't this Application ID also be set somehow in the assembly manifest? I now have a situation where I have a shortcut in the taskbar and after clicking the shortcut it opens in a new item in the taskbar. This must be because the Application ID is set in Main(), but not available when the program doesn't run.
Marc
A: 

See this article about ProductCode and PackageCode: http://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

It explains how ProductCode and PackageCode interact at install time and how to configure your setup project to properly apply the .msi as an update.

Jay
Great article but in no way related to the issue of the operator.
Marc

related questions