Okay, now this is getting strange and I hope someone can help me figure out what's going on here...
I just discovered that having a type 51 custom action to set TARGETDIR puts half the directories in the wrong place when I copy the msi to a machine and run it locally. When I copy the msi to the machine and run it remotely through WMI, the directories are put in the right place. So when I *thought* I'd resolved it by moving the CA from Before="CostInitialize" to Before="CostFinalize" it would appear the bigger difference was running the msi through our little utility using WMI instead of running it manually on the spot. So again, anyone have any clue why running the msi locally with TARGETDIR set in a custom action would result in the directories being placed in the wrong spots? And why running the same msi through WMI would put them in the right places? Thanks Mark -----Original Message----- From: Mark Modrall [mailto:mmodrall@...] Sent: Wednesday, September 28, 2011 3:57 PM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] Dealing with ICE48 warning Hi... Our installers are used internally to install to a farm, so we had <Property Id="TARGETDIR" Value="C:\OurPath" /> In our old Wix 2.0 scripts. We recently updated to Wix 3.5, and I started getting ICE48 warnings. I googled around on how to do this "properly", and I found some posts about moving the definition of the target directory to a custom action "at an early stage". So I replaced the definition above with <Custom Action="SetTarget" Before="CostInitialize" /> <Custom Action="InstallConfig" Before="InstallFinalize">NOT Installed</Custom> </InstallExecuteSequence> <CustomAction Id="SetTarget" Property="TARGETDIR" Value="C:\OurPath\" /> <CustomAction Id="InstallConfig" Impersonate="no" Return="check" Execute="deferred" FileKey="InstallConfig.exe" ExeCommand="[TARGETDIR]" /> That did get rid of the warning, but now when I run the installers produced most of the subdirectories end up at C:\ instead - except for a couple which end up in the right place for reasons I haven't figured out. For example, my main msi wxs file has <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="Binaries" Name="Binaries"> <Merge Id="PTCoreModule" Language="1033" SourceFile="..\PTCoreModule\bin\Release\PTCoreModule.msm" DiskId="1" /> ... <Component Id="InstallConfig" Guid="D746C5C0-12CB-4d4a-AA65-361D578F09F5"> <File Id='InstallConfig.exe' Name='InstallConfig.exe' DiskId='1' Source='..\InstallConfig\bin\Release\InstallConfig.exe' Vital='yes' /> <File Id='InstallConfig.pdb' Name='InstallConfig.pdb' DiskId='1' Source='..\InstallConfig\bin\Release\InstallConfig.pdb' /> </Component> </Directory> <Directory Id="ASP" Name="ASP"> <Merge Id="AspModule" Language="1033" SourceFile="..\AspModule\bin\Release\AspModule.msm" DiskId="1" /> </Directory> <Directory Id="Ptt" Name="Ptt"> <Merge Id="PttModule" Language="1033" SourceFile="..\PttModule\bin\Release\PttModule.msm" DiskId="1" /> </Directory> </Directory> The Component under Binaries ends up in C:\OurPath\Binaries\InstallConfig.exe, but PTCore's contents end up in C:\Binaries. The AspModule ends up in C:\ASP\, but PttModule ends up in C:\OurPath\Ptt. So a) did I just pick the wrong way to deal with ICE 48? Or more importantly, what did I do wrong? b) What's the "right" way? c) Any guesses why some directories would seem to work and others not? Seems like I should just live with the warnings until I figure out how to do it right... Thanks mark ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users