MSI: Fix installation path for extended install
Open, Needs TriagePublic

Assigned To
None
Authored By
timegrid
Wed, Sep 30, 2:17 PM

Description

On vsd-3.4.0 the extended install fails, because WixPerMachineFolder is set to APPLICATIONFOLDER, which is empty (set only for win64). This causes the properties to be deleted, before the dialog is shown, and the installation fails with Specified path is empty:

Action start 11:24:50: OverwriteWixSetDefaultPerMachineFolder.
MSI (c) (9C:EC) [11:24:50:530]: PROPERTY CHANGE: Deleting WixPerMachineFolder property. Its current value is 'C:\Program Files (x86)\GnuPG VS-Desktop'.
[...]
MSI (c) (9C:A0) [11:24:54:108]: PROPERTY CHANGE: Deleting APPLICATIONFOLDER property. Its current value is 'C:\Program Files (x86)\GnuPG VS-Desktop\'.
[...]
DEBUG: Error 2343:  Specified path is empty.

Workaround: Set the APPLICATIONFOLDER manually on CLI:

msiexec /i GnuPG-VS-Desktop-3.4.0.0-Standard.msi APPLICATIONFOLDER="%ProgramFiles(x86)%\GnuPG VS-Desktop\"

Fix: Also set the default directory on win32 (successfully tested):

diff --git i/src/make-msi.pl w/src/make-msi.pl
index c837b145..6579b9b2 100644
--- i/src/make-msi.pl
+++ w/src/make-msi.pl
@@ -2231,18 +2231,14 @@ print <<EOF;

     <Property Id="ApplicationFolderName" Value="$::product_name" />
     <Property Id="WixAppFolder" Value="WixPerMachineFolder" />
-EOF

-# The following is according to
-# https://stackoverflow.com/questions/5479790/wix-how-to-override-c-program-files-x86-on-x64-machine-in-wixui-advanced-s
-#
-($::win64 eq 'yes') && print <<EOF;
+    <!-- The following is according to
+         https://stackoverflow.com/questions/5479790/wix-how-to-override-c-program-files-x86-on-x64-machine-in-wixui-advanced-s
+    -->
     <SetDirectory Id="APPLICATIONFOLDER"
                Value="[$::pfilesfolder][ApplicationFolderName]"
                     >APPLICATIONFOLDER=""</SetDirectory>
-EOF

-print <<EOF;
     <Property Id="APPLICATIONFOLDER">
       <RegistrySearch Id='gpg4win_instdir_registry' Type='raw'
        Root='HKLM' Key="$::instdirkey" Name="$::instdirname" />

Details

Version
vsd-3.4.0

Event Timeline

timegrid created this object with edit policy "Contributor (Project)".