|
From: Nat L. <nat...@gm...> - 2005-06-22 03:01:22
|
You can try this <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder" Name="PFiles"> <Directory Id="INSTALLDIR" Name="MyProg"> <Component/>... <Directory </Directory> </Directory> And set INSTALLDIR instead of TARGETDIR. That's the way it has been put in a couple samples I have seen. Nat -----Original Message----- From: wix...@li... [mailto:wix...@li...] On Behalf Of Erik S. LaBianca Sent: Tuesday, June 21, 2005 7:26 PM To: wix...@li... Subject: [WiX-users] setting TARGETDIR, and executing the installed program on completion Hello All, Sorry, but two more RTFM type question's. First... How am I supposed to set the TARGETDIR property? I see lots of examples using <Directory Id="TARGETDIR" Name="SourceDir">, however, in order to get my msm files to go where I expected them, I needed to use <Directory Id="ProgramFilesFolder" Name="PFiles"> <Directory Id="TARGETDIR" Name="SourceDir"><Component/>... </Directory></Directory>. Initially, I was using <Property Id="TARGETDIR">C:\Program Files\My Program</Property> but thats not very cool since some systems aren't installed on C. I saw an example that did this: <CustomAction Id="SET_TARGETDIR" Property="TARGETDIR" Value="[ProgramFilesFolder]\[Company]\[ProductName]" Execute="firstSequence" /> <InstallExecuteSequence> <Custom Action="SET_TARGETDIR" Before="CostInitialize">TargetDir=''</Custom> </InstallExecuteSequence> But then my installer installs to c:\, even if I remove the conditional from the the Custom tag. I also tried <Property Id="TARGETDIR">[ProgramFilesFolder]\[ProductName]</Property>, which complains that [ProgramFilesFolder] is unknown. What am I missing here? I'm assuming the [] syntax implies property substitution, and that the ProgramFilesFolder property is supposed to be set automatically by msiexec. Second... I'm trying to launch the installed product when the installer completes. I have a dialog in place that sets a LAUNCHPRODUCT property correctly, but I'm not getting the CustomAction tag right to actually launch it. Here's what I'm using: <CustomAction Id='LaunchFile' FileKey='Circulation.exe' ExeCommand='' Return='asyncNoWait' /> <InstallExecuteSequence> <Custom Action="LaunchProduct" After="InstallFinalize">(not installed and LAUNCHPRODUCT=1)</Custom> </InstallExecuteSequence> Circulation.exe is the id associated with the <file /> tag for the primary executable. Any help is appreciated, Thanks --erik ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ WiX-users mailing list WiX...@li... https://lists.sourceforge.net/lists/listinfo/wix-users |