开发者

Setup Project in VS2010 migration problems

I have migrated from VS2008 to VS2010. Installing a Windows Service used to be a breeze and now the procedure stinks. 1st of all, my upgraded setup project result in an MSI which is not compatible with the MSI built with 2008. Two reasons actually: component GUIDs are changed somewhere, somehow, which results in most DLL's being removed if you run the MSI as an update (not fresh install, this works...sometimes, just read on). But hey, I use a postbuild script to ALTER MY MSI, something todo with InstallExecuteSequence table, no sweat...right. Second, you get the 'Service allready exists' error, because the windows Service you are installing is not stopped or removed during an update, but the installer does try to register the service in registry. But, hey, no problem, changed my custom action to stop the service AND remove the registry entries (last part done very ugly by starting a new process, which call sc.exe with some parameters, without showing console...ni开发者_如何学编程ce). So now no errors during an upgrade of my windows service. Yeay, close the ticket, move on. Not so fast: because the service is not stopped BEFORE the files are copied, the system has to be rebooted to finish the install when the Service is allready running. So now our customers have to REBOOT theire entire server resulting in downtime of all running processes? Unacceptable of course.

Nice job MS, this never was a problem with VS2008! Did you even try to test making an installer for a windows service? Sure hope you're reading this...

Enough complaining, I have deadlines to make: how to get my service stopped before all files are copied? Moving around some items in the InstallExecuteSequence table of the MSI? Anyone know which ones? Or does anyone know of a MS fix for setup projects which solves my problems?


Scrap the VS setup project and move on to WiX. I did that after having suffered for years with VS's setup projects, and I spent less than a day on getting my WiX project polished up and production-ready.

You can start by reverse-engineering your existing .msi into a WiX project, then edit it manually and change to the WiX UI dialogs and apply human readable names instead of the long guid-like things from VS installer project MSIs.

Download 3.5 (current stable release as of Jan 2011) from http://wix.codeplex.com/ - you'll never look back.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜