Skip to content

Commit e47900c

Browse files
anjannathgbraad
authored andcommitted
msi: enclose username in quotes in the command adding user to hyper-v admins group
if the username contains space the powershell command was failing and user was not added to the group
1 parent 524bc82 commit e47900c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packaging/windows/product.wxs.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
<CustomAction Id="InstallHyperv" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" />
101101
<SetProperty Action="CAAddUserToHypervAdminGroup"
102102
Id="AddUserToHypervAdminGroup"
103-
Value="&quot;[POWERSHELLEXE]&quot; -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command &quot;Add-LocalGroupMember -Member [LogonUser] -SID S-1-5-32-578&quot;"
103+
Value="&quot;[POWERSHELLEXE]&quot; -NonInteractive -ExecutionPolicy Bypass -NoProfile -Command &quot;Add-LocalGroupMember -Member '[LogonUser]' -SID S-1-5-32-578&quot;"
104104
Before="AddUserToHypervAdminGroup"
105105
Sequence="execute"/>
106106
<CustomAction Id="AddUserToHypervAdminGroup" BinaryKey="WixCA" DllEntry="WixQuietExec64" Execute="deferred" Impersonate="no" Return="ignore" />

0 commit comments

Comments
 (0)