I have a made a setup-project with WiX 3.8 in which i want to create a new user and add it to the administrators group. But each time my setup comes to that point, i get an error because of insufficient privileges. That's a little bit curious, because my user is an administrator on the virtual machine, on which i test the setup. What can i do?
That's the code in the WXS-file for creating the user:
<util:Group Id="Administrators"
Name ="Administrators"
Domain="[ComputerName]" />
<Component Id ="CreateUserAccount"
Guid="AEE91491-99FA-40A9-AB47-1E9FC2DDEF2A"
Directory="TARGETDIR">
<util:User Id ="SQLUser"
Name="[MyUsername]"
Password="[MyPassword]"
UpdateIfExists="no"
CreateUser="yes"
PasswordNeverExpires="yes"
PasswordExpired="no"
RemoveOnUninstall="no"
Domain="[ComputerName]">
<util:GroupRef Id ="Administrators"/>
</util:User>
</Component>