I have following component that I only want to execute during a new install.  
When I do a patch (msp file), I don't want to run this code, since I don't have 
a valid default [SERVICEACCOUNT] value.  Still, the code executes and I get a 
failure at ServiceInstall.  Why isn't my <Condition> working?

     <Component Id='MyService' Win64="$(var.Win64)" 
Guid='{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}' >
        <Condition><![CDATA[NOT (REMOVE="ALL") AND NOT Installed AND NOT 
REINSTALLMODE AND NOT REINSTALL]]></Condition>
        <util:User Id='ServiceUser' Name='[SERVICEACCOUNT]' 
Password='[SERVICEPASSWORD]' CreateUser='no' LogonAsService='yes'/>
        <File Id="File_MyService.exe" Name="$(var.MyService.exe)" KeyPath="yes" 
Source="$(var.Dir)\$(var.MyService.exe)" />
        <ServiceInstall Id='xxxxx'
                        Name='$(var.ServiceName)'
                        DisplayName='My Service'
                        Type='ownProcess'
                        Start='auto'
                        ErrorControl='normal'
                        Description='My Service'
                        Account='[SERVICEACCOUNT]'
                        Password='[SERVICEPASSWORD]'
                        Vital='yes'>
          <util:ServiceConfig FirstFailureActionType='restart' 
SecondFailureActionType='restart' ThirdFailureActionType='none' 
RestartServiceDelayInSeconds='10'
                              ResetPeriodInDays='1'/>
        </ServiceInstall>
        <ServiceControl Id="StartService" Stop="both" Remove="uninstall" 
Name="$(var.ServiceName)" Wait="yes" />
      </Component>

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to