Skip to content

Commit 49df29d

Browse files
committed
Fix NoModify/SystemComponent not working if explicitely set to false
1 parent b4e58b1 commit 49df29d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

MsiEngine.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ public void ConfigureMsi(Config config)
210210
UrlInfoAbout = config.Metadata?.AboutUrl,
211211
UrlUpdateInfo = config.Metadata?.UpdateUrl,
212212

213-
NoModify = config.Metadata?.ForbidModify,
214-
NoRepair = config.Metadata?.ForbidRepair,
215-
NoRemove = config.Metadata?.ForbidUninstall,
216-
SystemComponent = config.Metadata?.HideProgramEntry,
213+
NoModify = config.Metadata?.ForbidModify == true ? true : null, // WiX seems to expect null and not false, which is... odd.
214+
NoRepair = config.Metadata?.ForbidRepair == true ? true : null,
215+
NoRemove = config.Metadata?.ForbidUninstall == true ? true : null,
216+
SystemComponent = config.Metadata?.HideProgramEntry == true ? true : null,
217217
};
218218

219219
if (config.Metadata?.ProductIconPath is var icon && icon is not null && !Path.Exists(icon))

0 commit comments

Comments
 (0)