[wix-users] change/modify install uses default directory, not the value set by SetDirectory

Mike Henseler m.henseler at simfront.com
Thu Nov 18 04:29:48 PST 2021


FIXED.
I had to add  Secure="yes" to my property, so the search would pass value for both client and server processes.

<Property Id="APP1_DIR" Secure="yes"  >

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Mike Henseler via wix-users
Sent: November 15, 2021 5:28 PM
To: wix-users at lists.wixtoolset.org
Cc: Mike Henseler <m.henseler at simfront.com>
Subject: [wix-users] change/modify install uses default directory, not the value set by SetDirectory

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)










____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


***** This email was sent outside of your organization *****



More information about the wix-users mailing list