[wix-users] (deprecated) Sub-Folders not updating install location correctly

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[wix-users] (deprecated) Sub-Folders not updating install location correctly

Aaron Brookes
I am having trouble getting my installation to work correctly.  In my
installation, the user needs to select 3 paths, the Program Installation
folder, the Local data folder, and the Server data folder.  The Local and
Server data folders can be shared, or separate folders depending on the
user.  I have got the install to allow to select all three folders, and the
properties are getting updated, but for some reason, it is not updating the
sub-folders of my Server data folder.  However, both the Program install and
the Local data folders are updating correctly, and I am totally stumped as
to what is happening.  If anyone can help I would sincerely appreciate it.

 

I am including copies of the WXS files as well as the relevant portion of
the log file to help to try to determine what the problem is.  

 

I am assuming that the user is performing a full UI install, at the present
point in time.  I may allow for Minimal UI and Administrative installs
later, but I need to get it working with the Full UI currently.  I removed
all GUIDs from the files and inserted "YOUR_GUID_HERE" instead.  I also
anonymized the folder names.  I have attached the section of the install log
showing where the local data folder path was updated, but the server data
sub-folders were not, at the end of the message.

 

WIX_UICustom:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <Fragment>

    <UIRef Id="WixUI_Common" />

 

    <UI Id="WixUI_Custom">

      <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />

      <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />

      <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes"
/>

 

      <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />

 

      <DialogRef Id="ErrorDlg" />

      <DialogRef Id="FatalError" />

      <DialogRef Id="FilesInUse" />

      <DialogRef Id="MsiRMFilesInUse" />

      <DialogRef Id="PrepareDlg" />

      <DialogRef Id="ProgressDlg" />

      <DialogRef Id="ResumeDlg" />

      <DialogRef Id="UserExit" />

 

      <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog"
Value="Return" Order="999">1</Publish>

 

      <Publish Dialog="WelcomeDlg" Control="Next"
Property="_InstallDirBrowserProperty" Value="PROGRAMFOLDER"
Order="1">1</Publish>

      <Publish Dialog="WelcomeDlg" Control="Next"
Property="_LocalJSDDirBrowserProperty" Value="DATAFOLDER"
Order="1">1</Publish>

      <Publish Dialog="WelcomeDlg" Control="Next"
Property="_ServerJSDDirBrowserProperty" Value="SERVERDATAFOLDER"
Order="1">1</Publish>

      <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog"
Value="MyInstallDirDlg" Order="2">NOT Installed AND NOT PATCH</Publish>

      <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog"
Value="VerifyReadyDlg" Order="2">Installed AND PATCH</Publish>

 

      <Publish Dialog="MyInstallDirDlg" Control="Back" Event="NewDialog"
Value="WelcomeDlg">1</Publish>

      <Publish Dialog="MyInstallDirDlg" Control="Next" Event="NewDialog"
Value="VerifyReadyDlg">1</Publish>

 

      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog"
Value="MyInstallDirDlg" Order="1">WixUI_InstallMode =
"InstallComplete"</Publish>

      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog"
Value="MaintenanceTypeDlg" Order="2">WixUI_InstallMode = "Repair" OR
WixUI_InstallMode = "Remove"</Publish>

      <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog"
Value="WelcomeDlg" Order="1">WixUI_InstallMode = "Update"</Publish>

 

      <Publish Dialog="MaintenanceWelcomeDlg" Control="Next"
Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish>

 

      <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton"
Event="NewDialog" Value="VerifyReadyDlg">1</Publish>

      <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton"
Event="NewDialog" Value="VerifyReadyDlg">1</Publish>

      <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog"
Value="MaintenanceWelcomeDlg">1</Publish>      

    </UI>

  </Fragment>

</Wix>

 

The relevant portion of my Directories.wxs:

<?xml version="1.0" encoding="UTF-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <Fragment>

    <Directory Id="TARGETDIR" Name="SourceDir">

      <Directory Id="DATAFOLDER" Name="My_Data">

        <Component Id="DataFolderComponent" Guid="YOUR_GUID_HERE"
KeyPath="yes" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no"
Location="either">

          <CreateFolder/>

        </Component>

        <Component Id="DataFolderRegistry" Guid="YOUR_GUID_HERE">

          <RegistryValue Root="HKLM" Key="SOFTWARE\My Software"
Name="Data_Location" Action="write" Type="string" Value="[DATAFOLDER]"/>

        </Component>

        <Directory Id="LOGSFOLDER" Name="Logs">

          <Component Id="LogsFolderComponent" Guid="YOUR_GUID_HERE"
SharedDllRefCount="no" KeyPath="yes" NeverOverwrite="no" Permanent="no"
Transitive="no" Win64="no" Location="either">

            <CreateFolder/>

          </Component>

        </Directory>

      </Directory>

 

      <Directory Id="SERVERDATAFOLDER" Name="My_Data">

        <Component Id="ServerDataFolderRegistry" Guid="YOUR_GUID_HERE">

          <RegistryValue Root="HKLM" Key="SOFTWARE\My Software"
Name="Server_Data_Location" KeyPath="yes" Action="write" Type="string"
Value="[SERVERDATAFOLDER]" />

        </Component>

 

        <Directory Id="SERVERUPDATESFOLDER" Name="Updates">

          <Directory Id="AUTOLAUNCHERUPDATEFOLDER" Name="Auto Launcher">

            <Component Id="ALUpdateFolder" Guid="YOUR_GUID_HERE"
KeyPath="yes" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no"
Location="either">

              <CreateFolder />

            </Component>

          </Directory>

          <Directory Id="AUTOUPDATERUPDATEFOLDER" Name="Auto Updater">

            <Component Id="AUUpdateFolder" Guid="YOUR_GUID_HERE"
KeyPath="yes" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no"
Location="either">

              <CreateFolder />

            </Component>

          </Directory>

          <Directory Id="AUTODOWNLOADERUPDATEFOLDER" Name="Auto Downloader">

            <Component Id="ADUpdateFolder" Guid="YOUR_GUID_HERE"
KeyPath="yes" NeverOverwrite="no" Permanent="no" Transitive="no" Win64="no"
Location="either">

              <CreateFolder />

            </Component>

          </Directory>

        </Directory>

      </Directory>

 

      <Directory Id="ProgramFilesFolder">

        <Directory Id="PROGRAMFOLDER" Name="My Program Software">

          <Component Id="MyFolder" Guid=" YOUR_GUID_HERE "
SharedDllRefCount="no" KeyPath="yes" NeverOverwrite="no" Permanent="no"
Transitive="no" Win64="no" Location="either">

            <CreateFolder />

          </Component>

          <Component Id="MyFolderRegistry" Guid=" YOUR_GUID_HERE ">

            <RegistryValue Root="HKLM" Key="SOFTWARE\My Software"
Name="Program_Location" Action="write" Type="string"
Value="[PROGRAMFOLDER]"/>

          </Component>

 

          <Directory Id="AUTOLAUNCHERFOLDER" Name="Jayhawk Auto Launcher">

            <Directory Id="AUTOLAUNCHERICONSFOLDER" Name="Icons"/>

          </Directory>

 

          <Directory Id="AUTOUPDATERFOLDER" Name="Auto Updater" />

 

          <Directory Id="AUTODOWNLOADERFOLDER" Name="Auto Downloader" />

        </Directory>

      </Directory>

. . . . .

    </Directory>

  </Fragment>

</Wix>

 

MyInstallDirDlg.wxs:

<?xml version="1.0" encoding="utf-8"?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

<Fragment>

<UI>

<Dialog Id="MyInstallDirDlg" Width="370" Height="270"
Title="!(loc.MyInstallDirDlg_Title)" TrackDiskSpace="yes">

                                <Control Id="Back" Type="PushButton" X="192"
Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" />

                                <Control Id="Next" Type="PushButton" X="248"
Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">

                                                                <Subscribe
Event="SelectionNoItems" Attribute="Enabled" />

                                </Control>

                                <Control Id="Cancel" Type="PushButton"
X="304" Y="243" Width="56" Height="17" Cancel="yes"
Text="!(loc.WixUICancel)">

                                                                <Publish
Event="SpawnDialog" Value="CancelDlg">1</Publish>

                                </Control>

                                <Control Id="BannerBitmap" Type="Bitmap"
X="0" Y="0" Width="370" Height="44" TabSkip="no"
Text="!(loc.MyInstallDirDlgBannerBitmap)" />

                                <Control Id="BannerLine" Type="Line" X="0"
Y="44" Width="370" Height="0" />

                                <Control Id="BottomLine" Type="Line" X="0"
Y="234" Width="370" Height="2" />

                                <Control Id="Description" Type="Text" X="25"
Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes"
Text="!(loc.MyInstallDirDlgDescription)" />

                                <Control Id="Title" Type="Text" X="15" Y="6"
Width="210" Height="15" Transparent="yes" NoPrefix="yes"
Text="!(loc.MyInstallDirDlgTitle)" />

                               

                <Control Id="InstallLocationLabel" Type="Text" X="10" Y="50"
Width="345" Height="10" Text="!(loc.MyInstallDirDlgInstallLocationLabel)">

                                <Condition
Action="hide">Installed</Condition>

                </Control>

                <Control Id="InstallLocation" Type="PathEdit" X="10" Y="67"
Width="281" Height="20" Property="_InstallDirBrowserProperty"
Indirect="yes">

                                <Condition
Action="hide">Installed</Condition>

                </Control>

                <Control Id="InstallBrowse" Type="PushButton" X="296" Y="69"
Width="66" Height="17" Text="!(loc.MyInstallDirDlgBrowse)">

                                <Publish Property="_BrowseProperty"
Value="[_InstallDirBrowserProperty]" Order="1">1</Publish>

                                <Publish Event="SpawnDialog"
Value="BrowseDlg" Order="2">1</Publish>

                                <Publish Event="SetTargetPath"
Value="[_BrowseProperty]" Order="3">1</Publish>

                                <Condition
Action="hide">Installed</Condition>

                                <Condition
Action="disable">Installed</Condition>

                </Control>

 

                <Control Type="Line" Id="LineDivider1" Width="370"
Height="2" X="0" Y="108" />

 

                <Control Id="LocalJSDLocationLabel" Type="Text" X="10"
Y="114" Width="345" Height="10"
Text="!(loc.MyInstallDirDlgLocalJSDLocationLabel)">

                                <Condition
Action="hide">Installed</Condition>

                </Control>

                <Control Id="LocalJSDLocation" Type="PathEdit" X="10"
Y="131" Width="281" Height="20" Property="_LocalJSDDirBrowserProperty"
Indirect="yes">

                                <Condition
Action="hide">Installed</Condition>

                </Control>

                <Control Id="LocalJSDBrowse" Type="PushButton" X="296"
Y="133" Width="66" Height="17" Text="!(loc.MyInstallDirDlgBrowse)">

                                <Publish Property="_BrowseProperty"
Value="[_LocalJSDDirBrowserProperty]" Order="1">1</Publish>

                                <Publish Event="SpawnDialog"
Value="BrowseDlg" Order="2">1</Publish>

                                <Publish Event="SetTargetPath"
Value="[_BrowseProperty]" Order="3">1</Publish>

                                <Condition
Action="hide">Installed</Condition>

                                <Condition
Action="disable">Installed</Condition>

                </Control>

               

                <Control Type="Line" Id="LineDivider2" Width="370"
Height="2" X="0" Y="172" />

 

                <Control Id="ServerJSDLocationLabel" Type="Text" X="10"
Y="178" Width="345" Height="10"
Text="!(loc.MyInstallDirDlgServerJSDLocationLabel)">

                                <Condition
Action="hide">Installed</Condition>

                </Control>

                <Control Id="ServerJSDLocation" Type="PathEdit" X="10"
Y="195" Width="281" Height="20" Property="_ServerJSDDirBrowserProperty"
Indirect="yes">

                                <Condition
Action="hide">Installed</Condition>

                </Control>                

                <Control Id="ServerJSDBrowse" Type="PushButton" X="296"
Y="197" Width="66" Height="17" Text="!(loc.MyInstallDirDlgBrowse)">

                                <Publish Property="_BrowseProperty"
Value="[_ServerJSDDirBrowserProperty]" Order="1">1</Publish>

                                <Publish Event="SpawnDialog"
Value="BrowseDlg" Order="2">1</Publish>

                                <Publish Event="SetTargetPath"
Value="[_BrowseProperty]" Order="3">1</Publish>

                                <Condition
Action="hide">Installed</Condition>

                                <Condition
Action="disable">Installed</Condition>

                </Control>

</Dialog>

</UI>

</Fragment>

</Wix>

 

 

 

Install Log:

(UNKNOWN)     Action 11:06:51: WelcomeDlg.

(UNKNOWN)     Action start 11:06:51: WelcomeDlg.

(UNKNOWN)     Action 11:06:51: WelcomeDlg. Dialog created

(CLIENT)     MSI (c) (58:14) [11:06:51:374]: Note: 1: 2205 2: 3:
_RemoveFilePath

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: PROPERTY CHANGE: Modifying
CostingComplete property. Its current value is '0'. Its new value: '1'.

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: Note: 1: 2205 2: 3: BindImage

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: Note: 1: 2205 2: 3: ProgId

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: Note: 1: 2205 2: 3:
PublishComponent

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: Note: 1: 2205 2: 3: SelfReg

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: Note: 1: 2205 2: 3: Extension

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: Note: 1: 2205 2: 3: Font

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: Note: 1: 2205 2: 3: Class

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: Note: 1: 2205 2: 3: Icon

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: Note: 1: 2205 2: 3: TypeLib

(CLIENT)     MSI (c) (58:14) [11:06:51:389]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:06:53:749]: PROPERTY CHANGE: Adding
_InstallDirBrowserProperty property. Its value is 'PROGRAMFOLDER'.

(CLIENT)     MSI (c) (58:70) [11:06:53:749]: PROPERTY CHANGE: Adding
_LocalJSDDirBrowserProperty property. Its value is 'DATAFOLDER'.

(CLIENT)     MSI (c) (58:70) [11:06:53:749]: PROPERTY CHANGE: Adding
_ServerJSDDirBrowserProperty property. Its value is 'SERVERDATAFOLDER'.

(CLIENT)     MSI (c) (58:70) [11:06:53:749]: Note: 1: 2205 2: 3: Error

(CLIENT)     MSI (c) (58:70) [11:06:53:749]: Note: 1: 2228 2: 3: Error 4:
SELECT `Message` FROM `Error` WHERE `Error` = 2898

(UNKNOWN)     Info 2898.For WixUI_Font_Title textstyle, the system created a
'Tahoma' font, in 0 character set, of 14 pixels height.

(UNKNOWN)     Action 11:06:53: MyInstallDirDlg. Dialog created

(CLIENT)     MSI (c) (58:70) [11:06:54:249]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:06:54:749]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:06:55:249]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:06:55:749]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:06:56:264]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:06:56:764]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:06:57:030]: PROPERTY CHANGE: Adding
_BrowseProperty property. Its value is 'DATAFOLDER'.

(CLIENT)     MSI (c) (58:70) [11:06:57:046]: Note: 1: 1402 2:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explore
r 3: 2

(UNKNOWN)     Action 11:06:57: BrowseDlg. Dialog created

(CLIENT)     MSI (c) (58:70) [11:07:01:249]: PROPERTY CHANGE: Modifying
DATAFOLDER property. Its current value is 'c:\My_Data\'. Its new value:
'c:\My_Data2\'.

(CLIENT)     MSI (c) (58:70) [11:07:01:327]: PROPERTY CHANGE: Modifying
LOGSFOLDER property. Its current value is 'c:\My_Data\Logs\'. Its new value:
'c:\My_Data2\Logs\'.

(CLIENT)     MSI (c) (58:70) [11:07:01:327]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:07:01:811]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:07:02:311]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:07:02:811]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:07:03:311]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:07:03:811]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:07:04:311]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:07:04:811]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:07:05:249]: PROPERTY CHANGE: Modifying
SERVERDATAFOLDER property. Its current value is 'c:\My_Server_Data\'. Its
new value: 'c:\My_Server_Data3\'.

(CLIENT)     MSI (c) (58:70) [11:07:05:311]: Note: 1: 2727 2:

(UNKNOWN)     Action 11:07:05: VerifyReadyDlg. Dialog created

(CLIENT)     MSI (c) (58:70) [11:07:05:842]: Note: 1: 2727 2:

(CLIENT)     MSI (c) (58:70) [11:07:06:342]: Note: 1: 2727 2:

(UNKNOWN)     Action ended 11:07:06: WelcomeDlg. Return value 1.

(CLIENT)     MSI (c) (58:A4) [11:07:06:342]: Doing action: ProgressDlg

(CLIENT)     MSI (c) (58:A4) [11:07:06:342]: Note: 1: 2205 2: 3: ActionText

(UNKNOWN)     Action 11:07:06: ProgressDlg.

(UNKNOWN)     Action start 11:07:06: ProgressDlg.

(UNKNOWN)     Action 11:07:06: ProgressDlg. Dialog created

(UNKNOWN)     Action ended 11:07:06: ProgressDlg. Return value 1.

(CLIENT)     MSI (c) (58:A4) [11:07:06:358]: Doing action: ExecuteAction

(CLIENT)     MSI (c) (58:A4) [11:07:06:358]: Note: 1: 2205 2: 3: ActionText

(UNKNOWN)     Action 11:07:06: ExecuteAction.

(UNKNOWN)     Action start 11:07:06: ExecuteAction.

(CLIENT)     MSI (c) (58:A4) [11:07:06:358]: PROPERTY CHANGE: Adding
SECONDSEQUENCE property. Its value is '1'.

(CLIENT)     MSI (c) (58:A4) [11:07:06:405]: Grabbed execution mutex.

(CLIENT)     MSI (c) (58:A4) [11:07:06:405]: Incrementing counter to disable
shutdown. Counter after increment: 0

(CLIENT)     MSI (c) (58:A4) [11:07:06:405]: Switching to server:
PROGRAMFOLDER="c:\Program Files (x86)\My Program Software\"
DATAFOLDER="c:\My_Data2\" LOGSFOLDER="c:\My_Data2\Logs\"
SERVERDATAFOLDER="c:\My_Data3\"
AUTOLAUNCHERUPDATEFOLDER="c:\My_Data\Updates\Auto Launcher\"
AUTOUPDATERUPDATEFOLDER="c:\My_Data\Updates\Auto Updater\"
AUTODOWNLOADERUPDATEFOLDER="c:\My_Data\Updates\Auto Downloader\"
AUTOLAUNCHERFOLDER="c:\Program Files (x86)\My Program Software\Auto
Launcher\" AUTOLAUNCHERICONSFOLDER="C:\Program Files (x86)\My Program
Software\Auto Launcher\Icons\" AUTOUPDATERFOLDER="C:\Program Files (x86)\My
Program Software\Auto Updater\" AUTODOWNLOADERFOLDER="C:\Program Files
(x86)\My Program Software\Auto Downloader\" TARGETDIR="c:\"
SERVERUPDATESFOLDER="c:\My_Data\Updates\"
CURRENTDIRECTORY="C:\Windows\system32" CLIENTUILEVEL="0"
CLIENTPROCESSID="3416" USERNAME="TestUser" SOURCE

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users