Skip to content

Commit d5f8f10

Browse files
committed
WiX: fix checks against MSIINSTALLPERUSER
As of 519b43c MSIINSTALLPERUSER can be 0 instead of 1 or unset; so we have to switch our conditions to test not equal to 1 instead of not unset. Signed-off-by: Mark Yen <[email protected]>
1 parent bdf7510 commit d5f8f10

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

build/wix/main.wxs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113

114114
<!-- Setting the PATH variable -->
115115
<Component Id="PathUser" Directory="APPLICATIONFOLDER">
116-
<Condition>MSIINSTALLPERUSER</Condition>
116+
<Condition>MSIINSTALLPERUSER = 1</Condition>
117117
<RegistryValue
118118
Root="HKCU"
119119
Key="SOFTWARE\!(wix.AppGUID)"
@@ -130,7 +130,9 @@
130130
Value="[APPLICATIONFOLDER]resources\resources\linux\bin\" />
131131
</Component>
132132
<Component Id="PathSystem" Directory="APPLICATIONFOLDER">
133-
<Condition>NOT MSIINSTALLPERUSER</Condition>
133+
<Condition>
134+
<![CDATA[MSIINSTALLPERUSER <> 1]]>
135+
</Condition>
134136
<RegistryValue
135137
Root="HKLM"
136138
Key="SOFTWARE\!(wix.AppGUID)"

build/wix/scope.wxs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
X="236" Y="243" Width="56" Height="17">
4646
<Publish Order="1" Property="MSIINSTALLPERUSER" Value="{}">MSIINSTALLPERUSER = 0</Publish>
4747
<Publish Order="2" Property="ALLUSERS" Value="{}">MSIINSTALLPERUSER</Publish>
48-
<Publish Order="3" Property="ALLUSERS" Value="1">NOT MSIINSTALLPERUSER</Publish>
48+
<Publish Order="3" Property="ALLUSERS" Value="1">
49+
<![CDATA[MSIINSTALLPERUSER <> 1]]>
50+
</Publish>
4951
<Publish Order="4" Event="NewDialog" Value="RDVerifyReadyDlg">1</Publish>
5052
</Control>
5153
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)">

scripts/lib/installer-win32-gen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export default async function generateFileList(rootPath: string): Promise<string
213213

214214
'resources\\resources\\win32\\internal\\privileged-service.exe': (d, f) => {
215215
return <Component>
216-
<Condition>NOT MSIINSTALLPERUSER</Condition>
216+
<Condition>{'MSIINSTALLPERUSER <> 1'}</Condition>
217217
<File
218218
Name={f.name}
219219
Source={path.join('$(var.appDir)', d.name, f.name)}

0 commit comments

Comments
 (0)