Thanks Narina!
Just for future new WiXers, I ended up modifying the wxs as follows:
<CustomAction Id="SetTARGETDIR"
Directory="TARGETDIR"
Value="[ProgramFilesFolder][Manufacturer]\[ProductName]"
Return="check" />
And
<InstallExecuteSequence>
<Custom Action="SetTARGETDIR" After="InstallValidate" />
</InstallExecuteSequence>
Much appreciated,
Filip
-----Original Message-----
From: Narina, Chandra [mailto:[email protected]]
Sent: Wednesday, October 24, 2012 2:34 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] TARGETDIR not being set
Hi,
Use Directory attribute instead of property. (it's a Type 35 Custom
Action) and Schedule this action after InstallValidate in the Execute sequence
- that's when directories are checked for write access and truly set.
Something like this...
<CustomAction Id="SomeName" Directory =" TARGETDIR "
Value="[ProgramFilesFolder][Manufacturer]\[ProductName]"/>
Thanks & Regards
Narina Chandra Sekhar
-----Original Message-----
From: Filip Balas [mailto:[email protected]]
Sent: Wednesday, October 24, 2012 12:48 PM
To: '[email protected]'
Subject: [WiX-users] TARGETDIR not being set
NOOB Alert: I have been learning the ins and outs of WiX for appoximately a
day. I am having problems setting the TARGETDIR path. I used dark.exe to
reverse engineer a working MSI and read any posts I could find on this subject
but I seem to be unable to set the TARGETDIR to point to the path
ProgramFiles\Manufacturer\Product. Below is a distilation of my wxs file which
results in my application being installed to the root of my D-drive for some
reason:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
Name="FBL - Some App"
Language="1033"
Version="1.0.0.0"
Manufacturer="Foo & Bar Limited"
UpgradeCode="780286c6-e064-4402-80d8-dd2c68b56c04">
<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine"
Comments="Performs some operation that is important" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is
already installed." />
<Media Id="1" Cabinet="App.1.0.0.cab" EmbedCab="yes" />
<CustomAction Id="DIRCA_TARGETDIR"
Property="TARGETDIR"
Value="[ProgramFilesFolder][Manufacturer]\[ProductName]"
Execute="firstSequence"
Return="check" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Component Id="C__App.exe"
Guid="{074586E9-A675-2734-A4CD-1CE520922A41}">
<File Id="F__App.exe"
Name="App.exe"
KeyPath="yes"
Assembly=".net"
AssemblyManifest="F__App.exe"
AssemblyApplication="F__App.exe"
DiskId="1"
Source="D:\SomePath\bin\Debug\App.exe" />
</Component>
</Directory>
<Feature Id="DefaultFeature" ConfigurableDirectory="TARGETDIR"
Level="1">
<ComponentRef Id="C__App.exe" Primary="yes" />
</Feature>
<Icon Id="favicon.ico" SourceFile="d:\SomePath\favicon.ico" />
<Property Id="ARPPRODUCTICON" Value="favicon.ico" />
<UI />
<InstallExecuteSequence>
<Custom Action="DIRCA_TARGETDIR" Before="CostFinalize" />
</InstallExecuteSequence>
</Product>
</Wix>
I'm sure I am missing something simple but I cannot find any further
information on what to do from here.
Thanks,
Filip
________________________________
Disclaimer: The information transmitted is intended only for the use of the
individual or entity to which it is addressed, and may contain confidential,
proprietary and/or privileged material. If you are not an intended recipient,
you are advised that disclosing, copying, forwarding or other distribution of
this e-mail is strictly prohibited. E-mail transmission cannot be guaranteed to
be secure or error-free and the sender will not be liable for these risks. All
e-mail to or from this address is subject to archival, monitoring and/or
review, by and/or disclosure to, someone other than the recipient.
Regulatory Disclosure:
http://www.petersco.com/research_disclosure.cfm
------------------------------------------------------------------------
------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics Download AppDynamics Lite for free
today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics Download AppDynamics Lite for free
today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users