On Wed, Mar 17, 2010 at 4:17 PM, Pally Sandher <pally.sand...@iesve.com>wrote:
> Set the default path for it to be AppData & add a Type 51 Custom Action > to change the path to your .exe's directory when the main feature is > selected for install. > Many thanks for your answer. I understand the logic behind this, but I can't seem to do it - it's the "changing the path to the exe's directory" that I can't seem to work out. I think I want something like the following, even though this doesn't link... (Unresolved reference to symbol 'Directory:CONFIGDIRECTORY') <Component Id="C_CONFIG" Guid="A-REAL-GUID" Directory="CONFIGDIRECTORY"> <File Id="F_CONFIG" Name="config.xml" DiskId="1" KeyPath="yes" /> </Component> <CustomAction Id="CA_SETLOCALCONF" Property="CONFIGDIRECTORY" Value="INSTALLDIR" /> <Property Id="CONFIGDIRECTORY" Value="D_APPDATA" Secure="yes" /> <InstallExecuteSequence> <Custom Action="CA_SETLOCALCONF" Before="CostFinalize">&FT_DOLOCALCONF = 3</Custom> </InstallExecuteSequence> > Simplest option would be to modify your app so it always loads the > config from AppData regardless & just put it there. Actually why does it > need to be in the same directory as the .exe in the first place? From > your description it sounds like you could just put it in AppData & it'd > work as long as there wasn't one in the same directory as the .exe. > We provide the option to install a "portable" version, to be installed onto a USB drive or similar, so AppData can't be used for this type of install. Thanks again, Dave. > > -----Original Message----- > From: Dave Brotherstone [mailto:dav...@pobox.com] > Sent: 17 March 2010 06:59 > To: General discussion for Windows Installer XML toolset. > Subject: [WiX-users] Invert Feature based on other Feature > > Hi all, > > I have a feature that controls where the config file for our application > is located (either "locally" next to the exe in Program Files, or in > %APPDATA%). When this feature is selected, the config file is copied > correctly to the right place, and the indicator file (to let the .exe > know that the config should be loaded next to the .exe rather than > %APPDATA%) is also created. > > However, if this feature is not selected, I need to place the config > file in %APPDATA%. I had attempted to do this with a hidden feature for > the appdata config, and conditions on the main feature action, but that > doesn't seem to work. > > FT_DOLOCALCONF is the feature that is shown to the user. I've tried > with ! > states as well, but from what I've read action state is correct to use > in this case? > > <Feature Id="FT_APPDATACONFIG" AllowAdvertise="no" Level="0" > Display="hidden" Title="Hidden feature for AppData Config"> > <Condition Level="1">NOT > &FT_DOLOCALCONF=3</Condition> > <Condition Level="0">&FT_DOLOCALCONF=3</Condition> > <ComponentRef Id="C_APPDATACONFIG" /> </Feature> > > > Many thanks for any pointers, > > Dave. > ------------------------------------------------------------------------ > ------ > Download Intel® Parallel Studio Eval Try the new software tools for > yourself. Speed compiling, find bugs proactively, and fine-tune > applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users