Sorry it is me again. >From the command line, if I run
perl "C:\Program Files\Acme\Foobar 1.0\first.pl" install then the program works, note the quotes required because of whitespace in the path. When I put it into my wix file it does not work. <Property Id="QtExecCmdLine" Value="perl [INSTALLDIR]first.pl install"/> <CustomAction Id="QtExec" BinaryKey="wixca" DllEntry="CAQuietExec" Execute="immediate" Return="check"/> <Binary Id="wixca" src="c:\wix_v2_orig\wixca.dll"/> <InstallExecuteSequence> <Custom Action="QtExec" After="InstallFinalize"/> </InstallExecuteSequence> MSI (s) (A0!38) [14:30:09:419]: PROPERTY CHANGE: Deleting QtExecCmdLine property. Its current value is 'perl [INSTALLDIR]first.pl install'. CAQuietExec: Command string must begin with quoted application name. CAQuietExec: Error 0x80070057: invalid command line property value CAQuietExec: Error 0x80070057: failed to get Command Line Action ended 14:30:09: QtExec. Return value 3. Action ended 14:30:09: INSTALL. Return value 3. If I try the same with <Property Id="QtExecCmdLine" Value="perl C:\Program Files\Acme\Foobar 1.0\first.pl install"/> <CustomAction Id="QtExec" BinaryKey="wixca" DllEntry="CAQuietExec" Execute="immediate" Return="check"/> <Binary Id="wixca" src="c:\wix_v2_orig\wixca.dll"/> I get the same error message. The other option would be to perhaps call perl.exe directly and pass evertyhing else as parameters. From the command line perl.exe -w first.pl install works. So I tried using a Property and CustomAction to run it, question here though can you restrict this to running on install or un-install? when I plug it into the wix file it didn't!! Again any ideas here, again here is the code currently running. <Directory Id='TARGETDIR' Name='SourceDir'> <Directory Id='ProgramFilesFolder' Name='PFiles'> <Directory Id='Acme' Name='Acme'> <Directory Id='INSTALLDIR' Name='Foobar10' LongName='Foobar 1.0'> <Component Id='MainExecutable' Guid='{1DF29E50-1A88-410b-945E-251DA8309C96}'> <File Id='first' Name='first.pl' DiskId='1' Source='first.pl' Vital='yes'> </File> <File Id="svg" Name="svg" LongName="SVGView.exe" DiskId="1" Source="SVGView.exe" Vital="yes"> </File> <RemoveFolder Id='ProgramMenuDir' On='uninstall' /> </Component> </Directory> </Directory> </Directory> </Directory> <Feature Id='Complete' Level='1'> <ComponentRef Id='MainExecutable' /> </Feature> <!-- <Property Id="QtExecCmdLine" Value="perl C:\Program Files\Acme\Foobar 1.0\first.pl install"/> <CustomAction Id="QtExec" BinaryKey="wixca" DllEntry="CAQuietExec" Execute="immediate" Return="check"/> <Binary Id="wixca" src="c:\wix_v2_orig\wixca.dll"/> <InstallExecuteSequence> <Custom Action="QtExec" After="InstallFinalize"/> </InstallExecuteSequence> --> <Property Id='PERL'>perl.exe</Property> <CustomAction Id='LaunchFile' Property='PERL' ExeCommand='-w first.pl install' Return='asyncNoWait'/> <!-- <InstallExecuteSequence> <Custom Action='LaunchFile' After='InstallFinalize'></Custom> </InstallExecuteSequence> --> <!-- <CustomAction Id='LaunchFile' FileKey='first' ExeCommand='-w first.pl' Return='asyncNoWait' /> --> <!-- <CustomAction Id='LaunchFile' FileKey='first' ExeCommand='' Return='asyncNoWait' /> --> </Product> </Wix> Rob Hamflett wrote: > > Bah! You're right, and I've just remembered why. When specifying a > custom action like that, the > file in the file key has to be an executable. This isn't going to work > for your script file. Your > best bet is probably the Quiet Execution CustomAction. Look for it in the > WiX chm under > WiX Help -> Authoring -> WiX Standard CustomActions -> Quiet Execution > CustomAction > > Rob > > dave_c wrote: >> Hi Rob, >> >> I tried removing that but it lloks like things are more fundamental than >> I >> first thought. I've changed the script that runs to simply generate a >> file >> when run (not relying on any parameters). When I run it from command line >> it >> works fine. When I run from the msi nothing appears to happen, i.e. the >> file >> is not created. >> >> Looking at the log file generated it looks liek some sort of error >> occured >> at the end >> >> MSI (c) (10:0C) [11:36:16:068]: Note: 1: 1707 >> MSI (c) (10:0C) [11:36:16:068]: Note: 1: 2205 2: 3: Error >> MSI (c) (10:0C) [11:36:16:068]: Note: 1: 2228 2: 3: Error 4: SELECT >> `Message` FROM `Error` WHERE `Error` = 1707 >> MSI (c) (10:0C) [11:36:16:068]: Note: 1: 2205 2: 3: Error >> MSI (c) (10:0C) [11:36:16:068]: Note: 1: 2228 2: 3: Error 4: SELECT >> `Message` FROM `Error` WHERE `Error` = 1709 >> MSI (c) (10:0C) [11:36:16:068]: Product: SwapComm -- Installation >> completed >> successfully. >> >> MSI (c) (10:0C) [11:36:16:083]: Grabbed execution mutex. >> MSI (c) (10:0C) [11:36:16:083]: Cleaning up uninstalled install packages, >> if >> any exist >> MSI (c) (10:0C) [11:36:16:083]: MainEngineThread is returning 0 >> >> Have enclosed the full log file to see if it is of any use. >> >> Cheers >> >> Rob Hamflett wrote: >>> You don't need '[INSTALLDIR]first.pl' in the ExeCommand, as this is what >>> the FileKey is for. I >>> think you just need your 'install' argument there. >>> >>> Rob >>> >>> dave_c wrote: >>>> Excuse my stupidity. >>>> >>>> I want to install and then run a perl script passing a parameter to it >>>> but >>>> what I have written nothing appears to happen. >>>> >>>> I know if i run the script from the command line and pass a parameter >>>> it >>>> does what I want i.e. first.pl install >>>> >>>> but then I put in in the wix script it does not appear to work. Could >>>> someone point out what I have done wrong. >>>> >>>> <Directory Id='TARGETDIR' Name='SourceDir'> >>>> <Directory Id='ProgramFilesFolder' Name='PFiles'> >>>> <Directory Id='Acme' Name='Acme'> >>>> <Directory Id='INSTALLDIR' Name='Foobar10' LongName='Foobar >>>> 1.0'> >>>> >>>> <Component Id='MainExecutable' >>>> Guid='{1DF29E50-1A88-410b-945E-251DA8309C96}'> >>>> <File Id='first' Name='first.pl' DiskId='1' >>>> Source='first.pl' Vital='yes'> >>>> </File> >>>> <RemoveFolder Id='ProgramMenuDir' On='uninstall' /> >>>> </Component> >>>> </Directory> >>>> </Directory> >>>> </Directory> >>>> </Directory> >>>> >>>> <Feature Id='Complete' Level='1'> >>>> <ComponentRef Id='MainExecutable' /> >>>> </Feature> >>>> >>>> <CustomAction Id='LaunchFile' FileKey='first' >>>> ExeCommand='[INSTALLDIR]first.pl install' Return='asyncNoWait' /> >>>> >>>> <InstallExecuteSequence> >>>> <Custom Action='LaunchFile' After='InstallFinalize'></Custom> >>>> </InstallExecuteSequence> >>> >>> ------------------------------------------------------------------------- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to share >>> your >>> opinions on IT & business topics through brief surveys-and earn cash >>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>> _______________________________________________ >>> WiX-users mailing list >>> WiX-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/wix-users >>> >>> >> http://www.nabble.com/file/6696/dae.log dae.log > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > -- View this message in context: http://www.nabble.com/run-a-script-passing-a-parameter-tf3272181.html#a9101196 Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users