WiX is complaining (what are the odds, right?):
Error 95 The component 'blahblah' has a key file with path 'TARGETDIR\blah.dll'. Since this path is not rooted in one of the standard directories (like ProgramFilesFolder), this component does not fit the criteria for having an automatically generated guid. (This error may also occur if a path contains a likely standard directory such as nesting a directory with name "Common Files" under ProgramFilesFolder.)
But I WANT an automatically generated GUID, and I DON'T want to have to set the TARGETDIR to some other path comprised of ProgramFilesFolder since I am setting the TARGETDIR in the UI and I even allow the user to change it so that people can specify the path they want to install the application at...how does someone get this functionality? Is it possible? I mean, can I have the best of both worlds or not? Why is it such a big deal? WiX is way too restrictive sometimes...
I just got it...kind of annoying but its working alright...
I was modifying the TARGETDIR and working with it prior...but now, I realize that I can easily just have worked with INSTALLDIR...for example, I re-factored my directory structure as such:
<Directory Id='TARGETDIR' Name='SourceDir'>
...
<Directory Id="ProgramFilesFolder">
<Directory Id="blahFolder" Name="blah">
<Directory Id="INSTALLFOLDER" Name="blah"/>
</Directory>
</Directory>
</Directory>
I can get components to reference the INSTALLFOLDER and it will auto-generate GUIDs for them:
<ComponentGroup Id='blahgroup'>
<Component Id='blahId' Directory='INSTALLFOLDER' Transitive='no'>
<RegistryKey Root='HKLM' Key='Software\blah\blah' ForceCreateOnInstall='no' ForceDeleteOnUninstall='no'>
<RegistryValue Type='string' Name='blah' Value='BLAH' />
</RegistryKey>
</Component>
...
</ComponentGroup>
But in my UI, its nice because I can modify just the installation folder path quite well:
<Product ...>
...
<CustomAction Id='SetInstallFolder' Property='INSTALLFOLDER' Value='[ProgramFilesFolder]blah\blah\'/>
...
</Product>
I can then force the INSTALLFOLDER to point anywhere I want:
<InstallUISequence>
<Custom Action='SetInstallFolder' Sequence='1'/>
...
</InstallUISequence>
<AdminUISequence>
<Custom Action='SetInstallFolder' Sequence='1'/>
...
</AdminUISequence>