Hi Nicholas, Looks like you're just missing the "ApplicationFolderName" definition. See the documentation under "WixUI_Advanced Dialog Set" for more details - I've included an example below that goes two levels deep under program files, the documentation shows an example for installing directly under program files.
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="MyFolder" Name="ACME Software"> <Directory Id="APPLICATIONFOLDER" Name="My Application" DiskId="1" /> </Directory> </Directory> </Directory> <Property Id="ApplicationFolderName" Value="ACME Software\My Application" /> <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER" /> <UIRef Id="WixUI_InstallDir" /> <UIRef Id="WixUI_ErrorProgressText" /> In regards to your frustrations, I highly recommend reading the book "The Definitive Guide to Windows Installer" (you can find it on Amazon). Not a single piece of WiX code in it, and there doesn't need to be because WiX is simply a way to define Windows Installer packages in XML, if you don't understand how Windows Installer does things then WiX simply won't make sense - If something isn't supported by Windows Installer, it isn't supported by WiX (with the only exception being the "standard" custom actions WiX provides). Together the book mentioned above, msi.chm and WiX.chm will answer virtually any question you have. This list will answer the rest :) Sascha On Fri, Sep 4, 2009 at 3:12 AM, Nicholas Makin<nma...@opentext.com> wrote: > Please excuse my frustration but I am finding WiX to be neigh worthless - > why? Because there is a plethora of information by half of it is no good and > the other half points you to the mysterious MSI documentation which is > wonderful if one could figure out how that translates to WiX. > > All I want to do is have a default directory structure: > > <Directory Id="TARGETDIR" Name="SourceDir"> > <Directory Id="ProgramFilesFolder" Name="PFiles"> > <Directory Id="INSTALLDIR" Name="Acme"> > <Component Id="AppSettings" Guid=" > xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx "> > > But let the user choose to install in another place: > > <Property Id="WIXUI_INSTALLDIR" Value=" INSTALLDIR " /> > <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" > Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish> > <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" > Value="VerifyReadyDlg" Order="2">1</Publish> > <Publish Dialog="InstallDirDlg" Control="ChangeFolder" > Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish> > <Publish Dialog="InstallDirDlg" Control="ChangeFolder" > Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish> > > However when I use the above - no matter what the user chooses the component > is always placed at: C:\Program Files\Acme - i.e. the dialog is pointless. > > So I made this change: > > <Property Id="INSTALLDIR" Value="Acme" /> > <Directory Id="TARGETDIR" Name="SourceDir"> > <Directory Id="ProgramFilesFolder" Name="PFiles"> > <Directory Id="INSTALLDIR" Name="."> > <Directory Id="FILELOC" Name="OTInstaller"> > <Component Id="AppSettings" Guid=" > xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx "> > > Well this tries to install to come network drive named Acme. > > I did find that I can insert "C:\Program Files\Acme" but this results in a > warning about hard coding directories This is what I guess I will have to > live with. I did try something like [ProgramFilesFolder]\Acme - but this too > resulted in an error - I guess a property can't be used to set another > property in this way. > > Ultimately I know that my frustrations are a result of just not understanding > how MSI works with directories but all I have are 100's of examples to > extrapolate from and none of them seem to offer correct advice (i.e. it > either does not work (WiX Wiki example) or results in errors). As I fight my > way though building this installer I find that this has consistently been the > case - 100's of examples but no real information to help you extrapolate to > achieve what you need which is often just a tiny tweak on the example. > Without some sort of understanding there is no way to get form the example to > the desired functionality - and how can you build understanding from examples > that don't work? > > So aside from helping me get these files placed where the user wants them - > if someone ever figure out the secret to WiX - write a good solid book on it > and I will buy it and I know other users will love to have it. WiX is > wonderful - but so much time gets wasted trying to work out details. I am > ever to tempted to use VBScript to do custom actions to do things that WiX > clearly can do - just because I cannot figure out HOW to do it. This is > madness > > (I have found many books with WiX examples - generally a 2-3 page section > with an example that is usually copied from the tutorial (or darn near) or > the Wiki.) > > Nicholas > > (again sorry for the frustration in my tone) > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users