[ProgramFilesFolder] will be automatically set to the appropriate folder.
Windows Installer takes care of this property automatically.

On Mon, Jul 13, 2009 at 3:51 PM, Erica Chang (PROJECT) <eri...@microsoft.com
> wrote:

> What we are doing is installing sample sites that needs the location of the
> install as environment variable in web.config to access a file in the
> appsettings section.
>
> However, because our SDK only builds in 32bit, the web.config needs a file
> location but I need to detect whether to use %programfiles% or
> %programfiles(x86)% in web.config and I was hoping that during install, we
> can write some custom action to substitute appropriately.  Will
> ProgramFilesFolder work appropriately?
>
> Thanks for all the responses so far.
>
> Thanks,
> Erica
>
> -----Original Message-----
> From: Mike Carlson (DEV DIV) [mailto:mica...@microsoft.com]
> Sent: Monday, July 13, 2009 12:06 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Updating web.config field value depending on if
> machine's 64bit or 32bit
>
> Keep in mind it's better to avoid XmlFile / XmlConfig and just rely on
> standard IIS custom action functionality, if possible. I don't know enough
> about your particular scenario to know if it's possible in this case, but if
> you can throw a [ProgramFilesFolder] into your IIS authoring somewhere
> instead of relying on Xml modification of web.config, you'll be better off.
>
> I know in some cases modifying web.config with XmlFile / XmlConfig Vista
> will result in slightly unexpected behavior, because the IIS custom action
> doesn't flush data to disk in 3.0 (so XmlFile / XmlConfig would be operating
> on the XML file before it was modified by the IIS custom action, even though
> the IIS custom action was earlier in the sequence). A flush operation was
> added to the custom action to fix this scenario in 3.5, but 3.5 is still
> early on and it's hard to recommend it at this point in time.
>
> Thanks,
> Mike Carlson
>
> -----Original Message-----
> From: Don Benson [mailto:dbenso...@gmail.com]
> Sent: Monday, July 13, 2009 11:53 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] Updating web.config field value depending on if
> machine's 64bit or 32bit
>
> Windows Installer automatically handles translating the ProgramFilesFolder
> property for 32-bit vs. 64-bit platforms. Are you using an XMLFile element
> to set the web.config value? Use the [ProgramFilesFolder] property within
> the XMLFile element, and you should get what you want.
>
> - Don Benson -
> Tribute Inc.
>
> On Mon, Jul 13, 2009 at 1:59 PM, Erica Chang (PROJECT) <
> eri...@microsoft.com
> > wrote:
>
> > Hi,
> > I have a field in web.config that needs environment variable of
> > %ProgramFiles% or %ProgramFiles(x86)% depending on if the machine
> installing
> > is 64 bit or 32 bit.
> >
> > Is there a way to substitute the values during install time by detecting
> > this and setting the appropriate values?
> >
> > Thanks so much in advance.
> >
> > Regards,
> > Erica
> >
> >
> ------------------------------------------------------------------------------
> > Enter the BlackBerry Developer Challenge
> > This is your chance to win up to $100,000 in prizes! For a limited time,
> > vendors submitting new applications to BlackBerry App World(TM) will have
> > the opportunity to enter the BlackBerry Developer Challenge. See full
> prize
> > details at: http://p.sf.net/sfu/Challenge
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge
> This is your chance to win up to $100,000 in prizes! For a limited time,
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to