Skip to content

UsrMgr_CreateLocalUser

Creates a user on the local computer.

If a user with the same name already exists, the function logs The user already exists and returns True. It doesn’t change the existing user’s password, full name or description. To change them, use UsrMgr_ChangePassword and UsrMgr_SetLocalUserProperties.

Use * as the password to use the encrypted password stored on the computer for the user name. See Using passwords in CapaInstaller VB Scripting Library. If no encrypted password is stored for that user name, the function fails.

UsrMgr_CreateLocalUser(sUserName, sFullName, sPassword, sDescription) As Boolean

The name of the User

The user’s full name

The user’s password, or * to use the stored encrypted password

A description of this user

If bStatus Then bStatus = UsrMgr_CreateLocalUser("Username", "Full name", "*", "Description")

Scripting Guidelines

UsrMgr_CreateLocalGroup UsrMgr_AddUserToLocalGroup Constants Package Property Variables