[wix-users] change/modify install uses default directory, not the value set by SetDirectory
Mike Henseler
m.henseler at simfront.com
Mon Nov 15 14:28:15 PST 2021
I have two features that install files to different directories based on reg search (installpath) for each feature
Works fine on first time install, but not on a modify/change install.
I have default paths set as
<Directory Id='TARGETDIR' Name='SourceDir'>
<Directory Id='APP1' Name='app1'></Directory>
<Directory Id='APP2' Name='app2'></Directory>
</Directory>
Using SetDirectory action, I override default paths with paths gathered from registry.
<Property Id="APP1_DIR" >
<RegistrySearch Id="App1InstallDirSearch" Key='SOFTWARE\APP1)' Root="HKLM" Type="raw" />
</Property>
<SetDirectory Id="APP1" Sequence="both" Value='[APP1_DIR]' > </SetDirectory>
I do the same for APP2
All works fine on first time install, files are installed to directory from regsearch
fail scenario:
I install feature ONE and it installs to the directory from reg search, as expected.
however when running a change/modify install and select second feature to install, it doesn't use the path gathered from registry, it installs to the default directory.
The install log first shows the directory variable set as per registry (in client process), then it changes to the default directory (in service process.)
MSI (c) (18:C0) [15:55:36:973]: value of directory variable is still as per registry.
MSI (s) (2C:7C) [15:55:37:004]: Command Line: value of directory variable is still as per registry.
MSI (s) (2C:7C) [15:55:37:066]: PROPERTY CHANGE: value of directory variable is now changed to default
I have tested SetDirectory in all Sequences (both,execute,first,ui)
also tried setting directory variable from cmd line,
no success
> (WiX version in 3.11.4516.0)
> (.NET version 4.8.04084)
> (Windows 10.0.19043.0)
More information about the wix-users
mailing list