NetUserSetInfo with USER_INFO_1005 (level 1005)
USER_PRIV_ADMIN priviledge produces Error: USER_PRIV_PARMNUM (5)
My account is setup wtih Administrator priviledge so I should be able to create an account with
Administrator priviledge but the API produces the error noted.
I can successfully create the user and password via NetUserAdd.
However that user must be created as USER_PRIV_USER.
I need to set admin priviledge for the user, but NetUserSetInfo fails to do it.
I have also tried using "NetUserSetGroups" to set the user as a member of Administrators or "Power Users" and get error: NERR_GroupNotFound.
Can an Administrator user be created programatically?
I am installing a service that needs admin privilege.
The installer's account must have Admin priviledge
but I do not want to ask the customer to run Administrator program tools to set up a user account with Administrator privilege for the service to use for logon.