The following is only true to VS 2008 and above.
To avoid "error 1001" (which you will surly get for upgrade and repair with your MSI if you don't do this), In VS open Custom Action Editor and select the primary output of the custom action install. Open the Property table and set the property condition toNOT PREVIOUSVERSIONSINSTALLED.
Otherwise, when upgrading, MSI will try to reinstall the service which is not good it only need to replace the service's binary.
see here:
http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/bedbb8bd-dad5-4bcb-a87a-ac69386669b4/