WiX: installing on windows xp, custom action runs batch script "successfully" but the the work is not done
===

I have created an MSI installer with WiX.
I am specifically targeting Windows XP SP3+
It runs a custom action on completion of the installation to register the application as a service via NSSM.exe
The batch file when run from a command line does what it is written to do, but when run as part of the installer it completes the installation I see the command prompt open and the script run, but the application is not registered.

        <CustomAction Id="installLoft"
                  Directory="ModulesFolder"
                  ExeCommand="[ModulesFolder]winInstall.cmd"
                  Execute="deferred"
                  Return="check"
                  HideTarget="no"
                  Impersonate="no" />
    <InstallExecuteSequence>
      <Custom Action="installLoft" Before="InstallFinalize"><![CDATA[ (NOT Installed) AND (NOT REMOVE) ]]></Custom>
    </InstallExecuteSequence>


The batch script contents is:

    @ECHO OFF
    SET PATH=%PATH%;%APPDATA%\app1\
    IF "%ProgramFiles(x86)%"=="" (
        set PATH=%PATH%;%ProgramFiles%\app1\
    ) ELSE (
        set PATH=%PATH%;%ProgramFiles(x86)%\app1\
    )
    "app1\modules\bin\nssm.exe" install my_service_name_app1 app1.cmd -g

So, app1 is a script that needs to be run as a service, hence the need for NSSM.exe
All the components/files are installed in the right places.

Are there some Win XP caveats that I am missing? Running the batch manually with the same user that ran the installer, the service is registered.

Thanks for your help.