WIX: Create domain user fails with Access Denied error


I have MSI install project written in WixSharp. I need to create domain user account, so the final script contains "User" element.

<Component Id="ServerAccount2_" Guid="6fe30b47-2577-43ad-9095-1861a13d28b7" KeyPath="yes">
  <util:User Id="ServerAccount2_" Name="ServerAccount2" CanNotChangePassword="yes" CreateUser="yes" Domain="mydomain.ru" LogonAsService="yes" Password="[ACCOUNT_PASSWORD]" PasswordNeverExpires="yes" />

But user creation fails with Access Denied error. Log file contains line:

Info: CreateUser:  Error 0x80070005: failed to create user: ServerAccount2

Error code is quite clear, but I am logged in as Domain Administrator and this command line completes successfuly:

net user testaccount tgR_dv344 /ADD /DOMAIN

Is there anything I am missing? How do I create domain account from MSI?

asked on Stack Overflow Jan 12, 2019 by Anton Ch • edited Jan 12, 2019 by Anton Ch

0 Answers

Nobody has answered this question yet.

User contributions licensed under CC BY-SA 3.0