[wix-users] Major Upgrade of Service

Phil Wilson phil.wilson at mvps.org
Wed Nov 4 13:06:49 PST 2015


If the guids aren't the same and your upgrade is scheduled at the end (such
as after InstallExecute or InstallFinalize) then you'll be trying to install
a service with the same name on top of an existing service of the same name.
Using the same component guid makes the service the same, and being
upgraded. So yes, the guids need to be the same or your upgrade needs to be
early, such as afterInstallInitialize. 

Phil 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Brian Enderle
Sent: Wednesday, November 04, 2015 12:30 PM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Major Upgrade of Service

-- You might get this if you broke the component rules (the new component
guid or keypath of the component) is not the same as the original,  --

My original installer did not assign a GUID to either the Component or File
which IIRC will auto assign a GUID.  Is this true and if so if the auto
assigned GUID the same from build to build or does it change.  Could this be
what is keeping the service from installing?



Brian

If you can't explain it simply, you don't understand it well enough.  -
Albert Einstein

On Wed, Nov 4, 2015 at 3:24 PM, Phil Wilson <phil.wilson at mvps.org> wrote:

> You might get this if you broke the component rules (the new component 
> guid or keypath of the component) is not the same as the original, so 
> your component sharing is broken and you're trying to install the 
> service again, with the same name etc. Especially if your major 
> upgrade is sequenced late so that you are installing the upgrade over 
> the old product. Where is your major upgrade sequenced?
>
> Phil
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
> Behalf Of Brian Enderle
> Sent: Wednesday, November 04, 2015 11:59 AM
> To: WiX Toolset Users Mailing List
> Subject: Re: [wix-users] Major Upgrade of Service
>
> I removed the <RemoveFile> & <RemoveFolder> items from that component 
> group and tried to upgrade but I still get the same error.
>
> However, are those items something that got assigned during the 
> original install and would not be affected by me removing them in the 
> upgrade package?
>
> Brian
>
> If you can't explain it simply, you don't understand it well enough.  
> - Albert Einstein
>
> On Wed, Nov 4, 2015 at 2:36 PM, Phill Hogland 
> <phill.hogland at rimage.com>
> wrote:
>
> > I install several services in different bundles.  My ServiceInstall 
> > and ServiceControl are similar to your authoring, and I do not have 
> > any issues with doing an upgrade.  I have never used RemoveFile or 
> > RemoveFolder and am not sure why you would need them.  Are they
> contributing to your problem?
> >
> > -----Original Message-----
> > From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
> > Behalf Of Brian Enderle
> > Sent: Wednesday, November 04, 2015 12:33 PM
> > To: WiX Users <wix-users at lists.wixtoolset.org>
> > Subject: [wix-users] Major Upgrade of Service
> >
> > I have the following in a Product.wxs to setup a service and start 
> > it (SERVICE_USERNAM & SERVICE_PASSWORD are entered during the 
> > installation process, entered by the user):
> >
> >    <ComponentGroup Id="ProductComponents" Directory="INSTALLBINFOLDER">
> >       <Component Id="ProductComponent">
> >         <!--<File Id="Insert dll name" Name="Insert dll name again"
> > Source="Insert path to dll" Vital="yes" KeyPath="no" DiskId="1"/>-->
> >         <File Id="MyServiceEXE"
> >               Name="$(var.MyService.TargetFileName)"
> >               Source="$(var.MyService.TargetDir)\MyService.exe"
> >               Vital="yes"
> >               KeyPath="yes"
> >               DiskId="1" />
> >
> >
> >         <ServiceInstall Id="ServiceInstaller"
> >                         Type="ownProcess"
> >                         Vital="yes"
> >                         Name="My Service"
> >                         DisplayName="My Service"
> >                         Description="My Service is cool"
> >                         Start="auto"
> >                         Account="[SERVICE_USERNAME]"
> >                         Password="[SERVICE_PASSWORD]"
> >                         ErrorControl="normal"
> >                         Interactive="no" />
> >
> >         <ServiceControl Id="StartService"
> >                         Start="install"
> >                         Stop="both"
> >                         Remove="uninstall"
> >                         Name="My Service"
> >                         Wait="yes" />
> >
> >         <!-- Clean up Program Files -->
> >         <RemoveFile Id="RemoveInstallBinFiles" Name="*.*"
> > Directory="INSTALLBINFOLDER" On="uninstall"/>
> >         <RemoveFolder Id="RemoveInstallBinFolder"
> > Directory="INSTALLBINFOLDER" On="uninstall"/>
> >         <RemoveFolder Id="RemoveInstallFolder" Directory="INSTALLFOLDER"
> > On="uninstall"/>
> >
> >       </Component>
> >
> > The above works if the service does not currently exist on the 
> > machine to create and start the service.
> >
> >
> > I am now trying to make an upgrade to this service and am running 
> > into an issue during upgrading of (using the same credentials as 
> > before that I know should have the required privileges):
> >
> > Executing op: ServiceInstall(Name=My Service,DisplayName=My 
> > Service,ImagePath="C:\Program Files (x86)\My Company\My
> >
> > Service\bin\MyService.exe",ServiceType=16,StartType=2,ErrorControl=3
> > 27 
> > 69,,Dependencies=[~],,StartName=MyUserName,Password=**********,Descr
> > ip
> > tion=My
> > Service is cool,,)
> > InstallServices: Service:
> > Error 1923. Service 'My Service' (My Service) could not be installed.
> > Verify that you have sufficient privileges to install system services.
> >
> >
> >
> > Is there something special needed for an upgrade to a service?
> >
> >
> > Brian
> >
> > If you can't explain it simply, you don't understand it well enough.
> > - Albert Einstein
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant 
> > http://www.firegiant.com/
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant 
> > http://www.firegiant.com/
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/
>
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/
>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant
http://www.firegiant.com/




More information about the wix-users mailing list