I have several deferred Custom Actions that are conditioned to run only on XP or W7 All are using a variation on the same condition either <![CDATA[VersionNT>=600]]> for W7 or Vista or <![CDATA[VersionNT<600]]> for XP Just to ward off any comments about Win 2000 and older this installer is targeted for hardware that our company makes and distributes and isn't intended to be installed anywhere else.
All of the custom actions execut when intended except ScheduleStartRecorder which should never execute on an XP platform except that it does. Here's an excerpt from the /l*v log run on an XP box. (It doesn't fail on Windows 7 with the same sequence) ***************** MSI (s) (78:40) [10:14:10:937]: Doing action: ScheduleStartRecorder MSI (s) (78:40) [10:14:10:937]: Note: 1: 2205 2: 3: ActionText Action ended 10:14:10: ScheduleStartRecorder_Cmd. Return value 1. MSI (s) (78:B8) [10:14:10:937]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIBE.tmp, Entrypoint: CAQuietExec64 MSI (s) (78!88) [10:14:11:109]: PROPERTY CHANGE: Deleting QtExec64CmdLine property. Its current value is '"C:\WINDOWS\system32\SCHTASKS.EXE" /CREATE /F /TN "start VIPER" /XML "C:\Program Files\VayTek\Recorder\StartRecorderSchedule.xml"'. Action start 10:14:10: ScheduleStartRecorder. CAQuietExec64: ERROR: Invalid argument/option - '/XML'. CAQuietExec64: Type "SCHTASKS /CREATE /?" for usage. CAQuietExec64: Error 0x80070001: Command line returned an error. CAQuietExec64: Error 0x80070001: CAQuietExec64 Failed ***************** It's actually a good thing that it fails but why it is executing at all is a mystery. Another peculiar thing that I would like to understand is that this command along with all the others is either attempting or actually running 5 different times according to the log. The above sequence is repeated 3 times altogether. and the below is repeated twice. ******************** MSI (s) (78:2C) [10:13:44:578]: Skipping action: ScheduleStartRecorder (condition is false) ******************** Here are the custom action and schedule sequence declarations. Any help would be appreciated - I have a work around at the moment (it fails with return="ignore" but the way this project is going I'm going to have to depend on this logic sometime in the near future. <Wix etc...> <CustomAction Id="ClosePortW7_Cmd" Property="ClosePortW7" Value=""[$(var.PlatformSystemFolder)]netsh" advfirewall firewall delete rule name=Viper protocol=tcp localport=8001" /> <CustomAction Id="ClosePortW7" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" /> <CustomAction Id="ClosePortXP_Cmd" Property="ClosePortXP" Value=""[$(var.PlatformSystemFolder)]netsh" firewall delete portopening TCP 8001" /> <CustomAction Id="ClosePortXP" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" /> <CustomAction Id="RemovePortW7_Cmd" Property="RemovePortW7" Value=""[$(var.PlatformSystemFolder)]netsh" advfirewall firewall delete rule name=Viper protocol=tcp localport=8001" /> <CustomAction Id="RemovePortW7" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" /> <CustomAction Id="RemovePortXP_Cmd" Property="RemovePortXP" Value=""[$(var.PlatformSystemFolder)]netsh" firewall delete portopening TCP 8001" /> <CustomAction Id="RemovePortXP" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" /> <CustomAction Id="OpenPortW7_Cmd" Property="OpenPortW7" Value=""[$(var.PlatformSystemFolder)]netsh" advfirewall firewall add rule name=Viper protocol=tcp dir=in localport=8001 profile=any action=allow" /> <CustomAction Id="OpenPortW7" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" /> <CustomAction Id="OpenPortXP_Cmd" Property="OpenPortXP" Value=""[$(var.PlatformSystemFolder)]netsh" firewall set portopening TCP 8001 Viper" /> <CustomAction Id="OpenPortXP" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore" Impersonate="no" /> <CustomAction Id='ScheduleStartRecorder_Cmd' Property='ScheduleStartRecorder' Value='"[$(var.PlatformSystemFolder)]SCHTASKS.EXE" /CREATE /F /TN "start VIPER" /XML "[PRODUCTROOT]StartRecorderSchedule.xml"' /> <CustomAction Id="ScheduleStartRecorder" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" /> <InstallExecuteSequence> <!-- Set properties at runtime for deferred Custom Actions --> <Custom Action="ClosePortW7_Cmd" After="CostFinalize" /> <Custom Action="ClosePortXP_Cmd" After="CostFinalize" /> <Custom Action="RemovePortW7_Cmd" After="CostFinalize" /> <Custom Action="RemovePortXP_Cmd" After="CostFinalize" /> <Custom Action="OpenPortW7_Cmd" After="CostFinalize" /> <Custom Action="OpenPortXP_Cmd" After="CostFinalize" /> <Custom Action="ScheduleStartRecorder_Cmd" After="InstallInitialize"/> <Custom Action="ScheduleStartRecorder" After="InstallServices"><![CDATA[VersionNT>=600]]> AND (NOT REMOVE~="ALL" OR UPGRADINGPRODUCTCODE)</Custom> <Custom Action="ClosePortW7" After="InstallServices" ><![CDATA[VersionNT>=600]]> AND (NOT REMOVE~="ALL" OR UPGRADINGPRODUCTCODE)</Custom> <Custom Action="ClosePortXP" After="InstallServices" ><![CDATA[VersionNT<600]]> AND (NOT REMOVE~="ALL" OR UPGRADINGPRODUCTCODE)</Custom> <Custom Action="OpenPortW7" After="ClosePortW7" ><![CDATA[VersionNT>=600]]> AND (NOT REMOVE~="ALL" OR UPGRADINGPRODUCTCODE)</Custom> <Custom Action="OpenPortXP" After="ClosePortXP" ><![CDATA[VersionNT<600]]> AND (NOT REMOVE~="ALL" OR UPGRADINGPRODUCTCODE)</Custom> <Custom Action="RemovePortW7" After="InstallInitialize" ><![CDATA[VersionNT>=600]]> AND (REMOVE~="ALL") AND (NOT UPGRADINGPRODUCTCODE)</Custom> <Custom Action="RemovePortXP" After="InstallInitialize" ><![CDATA[VersionNT<600]]> AND (REMOVE~="ALL") AND (NOT UPGRADINGPRODUCTCODE)</Custom> </InstallExecuteSequence> </Wix> ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users