Tim Anderson's ITWriting [Valid RSS]

Tech writing blog

Blog Home RSS Archives ITWriting.com
Add to Feedburner Add to Bloglines Add to Newsgator Add to My Yahoo

July 4, 2006

Fixing Visual Studio setup projects

Posted 1486 days ago on July 4, 2006

Welcome to new blogger Mike Wade, who says:

I am a developer with the Deployment team. We are the team that enables the generation of installers for applications built by Visual Studio.

and Mike adds:

The Deployment team is contained within the VB product organization. Why? Other product units like to make things complicated and powerful, whereas VB likes to keep things simple and effective. And this is the model we want for our installers.

Mike, take a look at Wrestling with the Windows Installer. And read the comments.

The trouble is, the Visual Studio setup and deployment project is half-baked. Some things which should be easy are difficult or impossible, and when you try to fix these issues by editing the generated Windows Installer MSI file, you enter a world of pain.

I revisited this recently. I wanted to have a conditional shortcut. You know the type of thing: the installer has a dialog that says, "Check here to have a shortcut on the desktop."

You can do the dialog just fine in Visual Studio, but making it work is another matter. Here's one approach. The problem is, you can't have a condition on a shortcut. You can only have a condition on a component. But you can't have a component that is just a shortcut. So you have to do a custom action, which means running a script, which might break if some wretched anti-virus product has mucked around with the Windows Scripting Host; and you'd better run another script on uninstall otherwise the shortcut hangs around afterwards.

I actually chose a different solution. I have a component which is just a pointless readme file. I attach the condition to the component. I set up a shortcut to the component. Then I post-process the MSI file to change the target of the shortcut from the readme file to that of the executable.

Mike, this has to get better. Maybe the setup project is not meant for serious use. If so, then remove it. Alternatively, list out the top ten things people often want to do in setup routines (things like conditional shortcuts, or auto-starting the app after setup ends) and implement them.

I really think the Wix project could help here. If a setup project were a two way designer/code editor for Wix, then we could modify the XML to accomplish what we want, rather than attempting to post-process the MSI.

Either way, this does need attention. I'm disappointed that little changed in Visual Studio 2005, though at least you can now install for "Everyone" by default.

Tags:



No comments, be the first!


Add Comment

You are welcome to comment below. For your guidance, HTML is not supported and URLs will be displayed as plain text.

 Title

 Name

 Email - Optional, not displayed

 Website. Make Public?

Your comment

Please enter this code below:

 Code

Recent posts

Users plead with Borland to give up .NET
IE7 to be released 18th October,...
If Microsoft doesn't use UAC, why...
Google's unsettling lack of direction
Vista security: now prove it


Powered by bBlog