Reputation: 89
I have a WiX installer (say at 10.0) that copies some files. Everything with the file copy works fine. I am trying to create a patch from that version. Whenever the patch (10.1) is run, and the previous 10.0 install had to copy some of these files, I receive the following area while running the repair:
"The specified path [Path] is unavailable."
I have checked, and the specified path IS available. The files that were copied into are there. Further, the source data directory from which the files were copied from in the 10.0 install are also there. There are other directories into which other files are copied. I am not sure if they would also have the error, and I simply have not seen it yet.
What could be going wrong?
Here is my .wxs code, which is the same in both the original install and the patch:
<DirectoryRef Id="SAVEDDBFOLDER">
<Component Id="SavedDBVDirectory" Guid="xxx">
<CreateFolder>
<Permission User ="[WIX_ACCOUNT_ADMINISTRATORS]" GenericAll="yes"/>
<Permission User ="[WIX_ACCOUNT_USERS]" GenericAll="yes"/>
</CreateFolder>
</Component>
</DirectoryRef>
<CustomAction Id="SetOldDBVWFiles"
Property="OLDDBVWFILES"
Value="[PATHTOOLDVER]Saved DB Files"/>
<DirectoryRef Id="SAVEDDBFOLDER">
<Component Id="CopyOldDataBVFiles" Guid="yyy">
<CopyFile Id="CopyOldDBVWFiles"
Delete="yes"
SourceProperty="OLDDBVWFILES" DestinationProperty="SAVEDDBFOLDER" SourceName="*"/>
<Condition>
<![CDATA[(NOT Installed) AND (NOT REMOVE) AND (PREVIOUSVERSION << "8." OR PREVIOUSVERSION << "7.")]]>
</Condition>
</Component>
</DirectoryRef>
<!--This custom action runs in 10.0 install-->
<!--PREVIOUSHYVERSION is set for 10.0; it is not for 10.1-->
<CustomAction Id="SetOldDBVWFilesHy"
Property="OLDHYDBVWFILES"
Value="[PATHTOOLDAD]Saved DB Files"/>
<DirectoryRef Id="SAVEDDBFOLDER">
<Component Id="CopyOldHyDatabusViewerFiles" Guid="zzz">
<CopyFile Id="CopyOldHyDBVWFiles"
Delete="yes"
SourceProperty="OLDHYDBVWFILES" DestinationProperty="SAVEDDBFOLDER" SourceName="*"/>
<Condition>
<![CDATA[(NOT Installed) AND (NOT REMOVE) AND (PREVIOUSHYVERSION << "4.")]]>
</Condition>
</Component>
</DirectoryRef>
Upvotes: 2
Views: 667
Reputation: 89
Ok, I figured this one out. From the log files (msiexec /L*V "[log file]"), I discovered that one of the path variables -- "PATHTOOLDAD," and no, it's not a path to Dad's tools -- was not set in the patch. It shouldn't have mattered, as this property is only used in the initial install and not at all in the patch, but it had to be set to something. I added the option "PATHTOOLDAD=[whatever]" to the call to msiexec to set the property, and voila, it worked.
msiexec /i [MSP Patch File] PATHTOOLDAD=[path of old program that was removed]
Upvotes: 2