windows installer - What is wrong with this 'run executable' Wix xml code? -
i trying execute my.exe using your.exe. it's not working expected.
here code snippet:
<?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <product id="*" name="my_name" language="1033" version="1.11.5164" manufacturer="company" upgradecode="put-guid-here"> <package description="test file in product" comments="simple test" installerversion="200" compressed="yes" /> <media id="1" cabinet="simple.cab" embedcab="yes" /> <directory id="targetdir" name="sourcedir"> <directory id="programfilesfolder" name="pfiles"> <directory name="my_folder" id="my_folder"> <component id="your.exe" diskid="1" guid="*"> <file keypath="yes" id="your.exe" name="your.exe" source="your.exe" /> </component> </directory> </directory> </directory> <feature id="mainfeature" title="main feature" level="1"> <componentref id="your.exe" /> </feature> <customaction id="startapponexit" property="startapponexit" execommand="[systemfolder]cmd.exe /c your.exe my.exe " execute="immediate" return="asyncnowait" /> <installexecutesequence> <custom action="startapponexit" after="installfinalize">not installed</custom> </installexecutesequence> </product> </wix>
the custom action startapponexit
can't find your.exe. try using directory
attribute instead of property
attribute:
<customaction id="startapponexit" directory="my_folder" execommand="[systemfolder]cmd.exe /c your.exe my.exe " execute="immediate" return="asyncnowait" /> <installexecutesequence> <custom action="startapponexit" after="installfinalize">not installed</custom> </installexecutesequence>
this should run your.exe passing argument my.exe.
Comments
Post a Comment