I currently work (as you all probably know by now) on an installer for our 
software. 
Now I have a new problem which I need a bit of input on. 

My installer installs five windows services. This is all good and the services 
are installed correctly. 
They are not started for various reasons, but this has been tested and that 
works as well, should it be necessary. 

Uninstallation, however, is giving me a bit of a problem. On Windows XP there 
is nothing wrong, and the services are stopped and uninstalled fine. 
On Windows 7, however I get a warning that the installer will have to reboot 
when done. 
If I stop the services manually, there is not problems, then it uninstalls 
beautifully. 

In other words, it seems that the installer cannot stop the services when 
uninstalling on Windows 7. This is true regardless of whether I uninstall from 
Programs and Features og directly through call to msiexec. 

The exact message I get is: 

        The setup must update files or services that cannot be 
        updated while the system is running. If you choose to
        continue, a reboot will be required to complete the
        setup. 

As mentioned, this is not a problem on Windows XP. My code looks like this: 

<Component Id="MessageListenerComponent" 
Guid="44FCBFDC-7E2E-4EE6-9E17-30BB4C566421" DiskId="1">

        <File Id="MsgListener" Source="$(var.BuildPath)MessageListener.exe" 
KeyPath="yes" />
        <File Source="$(var.BuildPath)MessageListener.pdb" 
CompanionFile="MsgListener"/>
        <File Source="$(var.BuildPath)MessageListener.exe.config" 
CompanionFile="MsgListener" />

        <ServiceInstall Id="MsgInstall"
                DisplayName="!(loc.MessageListenerDisplayName)"
                Name="MessageListener"
                Description="!(loc.MessageListenerDescription)"
                ErrorControl="normal"
                Start="auto"
                Type="ownProcess"
                Account="NT AUTHORITY\NetworkService"
                Vital="yes"
                Interactive="no">

                <ServiceDependency Id="MSMQ"/>
                <ServiceDependency Id="NSEngine"/>
                   <ServiceDependency Id="SMI"/>
           </ServiceInstall>

           <ServiceControl Id="MsgLstnrControl" Name="MessageListener" 
Stop="uninstall" Remove="uninstall" Wait="yes"/>

        <fw:FirewallException Id="MsgLstnrException"
                Name="!(loc.MessageListenerFirewallException)"
                Program="[#MsgListener]"
                IgnoreFailure="yes"
                Protocol="tcp"
                Scope="localSubnet"/>

</Component>

There are five services, of which this is the third. It requires NSEngine and 
SMI which is two others of our services. 

For some reason the installer fails to elevate for the stop on uninstall, but 
how do I get it to do that? 


Thank you, 

Thomas Due


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to