# UsrMgr_SetLocalUserProperties

> Sets or changes a users account properties.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/user-management-functions/usrmgr-setlocaluserproperties/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

### Description

Sets or changes a users account properties.

### Syntax

UsrMgr_SetLocalUserProperties(sUserName, bNoPasswordChange, bNoPasswordExpire, bChangePasswordAtNextLogin, sAccountExpireDate, sLoginScript) As Boolean

### Parameters

#### sUserName (String)

The name of the user, the user must exist

#### bNoPasswordChange (Boolean)

Set or unset User cannot change password

#### bNoPasswordExpire (Boolean)

Set or unset Password never expires

#### bChangePasswordAt (Boolean)

The user has to change the password at next login

#### sAccountExpireDate (String)

The date the account expires. The sAccountExpireDate should be a valid date in the future. Specify 'Never' if the account should never expire

#### sLoginScript (String)

Specifies the login script the user should execute

### Example

**VBScript**

```vb
'Sample 1:
If bStatus Then bStatus = UsrMgr_SetLocalUserProperties("Username", False, False, True, "Never", "Login.cis")

'Sample 2: Note - DateAdd adds 5 years to current date in this example
If bStatus Then bStatus = UsrMgr_SetLocalUserProperties("Username", True, True, False, DateAdd("yyyy", 5, Now), "")
```

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/)

### Related functions

[UsrMgr_CreateLocalGroup](/capainstaller/vb-scripting-library/user-management-functions/usrmgr-createlocalgroup/) [UsrMgr_AddUserToLocalGroup](/capainstaller/vb-scripting-library/user-management-functions/usrmgr-addusertolocalgroup/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
