I have the following situation:
- Installed my application using ordinary .msi
- Run the application from the start menu
- 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 hav开发者_运维技巧e 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:
- The application is written in C# .NET 3.5 SP1
- The msi is created using a Setup Project in Visual Studio 2008 SP1
- I use a custom build tool to integrate the msi build and set the ProductCode and PackageCode to a new GUID for every version.
- The update seems to work fine otherwise. The old version is uninstalled, the new one installed correctly.
Anyone got a clue?
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
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.
精彩评论