Zhong's scenario with a filter driver is probably harder to get to shutdown
than a typical windows service. I expect that's the big difference.

On Mon, Jan 7, 2013 at 9:00 AM, Neil Sleightholm <n...@x2systems.com> wrote:

> I don't think this is the issue, I only do major upgrades and the service
> stops just fine.
>
> I think there is some timing issue between stopping the service and
> windows installer or SCM removing them and consequently the service is
> marked as deleted in the registry and not removed until a reboot. The
> restart manager doesn't detect that it is deleted and so the installer just
> fails when it tries to add the service.
>
> I am not sure how you can condition it as the ServiceInstall has to be in
> the same component as the service you are installing.
>
> Neil
>
> -----Original Message-----
> From: Rob Mensching [mailto:r...@robmensching.com]
> Sent: 07 January 2013 14:32
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] how to deal with the service removal during
> upgrade and repair in WIX?
>
> If you can't get the service to stop in time then you do need to do
> restart avoidance.
>
> Unfortunately, in an minor upgrade, I cannot think of anything set
> natively by the Windows Installer that will tell you you are in a minor
> upgrade.
> Minor upgrades are basically just a recache/reinstall so if you assume
> that the recache/reinstall is a minor upgraded you'll be wrong when it
> actually is just a recache/reinstall. However, thinking about this more you
> may not need to do anything in minor upgrade since a restart is required at
> the end of the install and there is only one MSI installed.
>
> Major upgrade is easy since you have the UPGRADINGPRODUCTCODE in the MSI
> to condition actions in the old MSI. Of course, you have to ship your first
> version correctly for this to work. <smile/>
>
>
> On Sun, Jan 6, 2013 at 2:58 AM, Neil Sleightholm <n...@x2systems.com>
> wrote:
>
> > I find this usually happens when the service doesn't shutdown in a
> > timely manner. In my experience the stop service control in Windows
> > Installer is a bit temperamental especially if you have more than one
> > service to stop (I have often resorted to using a custom action to run
> > "net stop"). It also makes a difference where you schedule the remove
> > existing products and I have had more luck with scheduling after
> > InstallExecute (probably because it isn't removing the service).
> >
> > (In my latest install I have found the most reliable option is to do
> > all the application and service stops in a separate install.)
> >
> > Neil
> >
> > -----Original Message-----
> > From: Wang, Zhongsheng [mailto:zhongsheng.w...@intel.com]
> > Sent: 05 January 2013 23:56
> > To: wix-users@lists.sourceforge.net
> > Subject: [WiX-users] how to deal with the service removal during
> > upgrade and repair in WIX?
> >
> > I am looking for some advice on how to deal with the service removal
> > during upgrade (major and minor) and repair. Since OS will mark the
> > service for deletion when the service is removed and reboot is
> > required, any future service update during the installation process
> > will be ignored. This leaves the service not installed after repair or
> upgrade.
> >
> > What I want is that the service will NOT be removed during upgrade and
> > repair but removed during uninstallation (Remove option).
> >
> > Here are some code snippet I am used to handle this, but it does not
> > work reliably. I hope somebody can give me some advice on this topic.
> > Your help will be highly appreciated. The code seems to work for
> > Repair and Major Upgrade, but does not work well with the minor
> > upgrade where only the 4th field of the revision is different.
> >
> > <!-- upgrade definition -->
> >     <Upgrade Id="$(var.UpgradeCode)"
> > <UpgradeVersion
> >         Property="MAJORUPGRADE"
> >         Minimum="0.0.0.0"
> >         IncludeMinimum="yes"
> >         Maximum="$(var.ProductVersion)"
> >         IncludeMaximum="no"
> >         OnlyDetect="no"
> >         IgnoreRemoveFailure="no"
> >         MigrateFeatures="yes" />
> >
> >       <!-- Detect for changes in 4th field only -->
> >       <UpgradeVersion
> > Property="MINORUPGRADE"
> >               Maximum="$(var.ProductVersion)"
> > Minimum="$(var.ProductVersion)"
> >               IncludeMinimum="yes"
> > IncludeMaximum="yes"
> > OnlyDetect="yes" />
> >     </Upgrade>
> >
> > <!-- Execution sequence -->
> > <InstallExecuteSequence>
> >       <Custom Action="Uninstall_HIDDriver" After="RemoveRegistryValues">
> >         <![CDATA[REMOVE="ALL" AND NOT (MAJORUPGRADE OR
> > MINORUPGRADE)]]></Custom> </InstallExecuteSequence>
> >
> > So what could be wrong?
> >
> > Thanks,
> > zhong
> >
> >
> > ----------------------------------------------------------------------
> > -------- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012,
> > HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your
> > skills current with LearnDevNow - 3,200 step-by-step video tutorials
> > by Microsoft MVPs and experts. SALE $99.99 this month only -- learn
> > more at:
> > http://p.sf.net/sfu/learnmore_122912
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> >
> > ----------------------------------------------------------------------
> > -------- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012,
> > HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your
> > skills current with LearnDevNow - 3,200 step-by-step video tutorials
> > by Microsoft MVPs and experts. ON SALE this month only -- learn more
> > at:
> > http://p.sf.net/sfu/learnmore_123012
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC,
> Windows 8 Apps, JavaScript and much more. Keep your skills current with
> LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and
> experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to