This function changes the password for the passed username. You must provide the current password. You must have PI administrator privileges to change a password other than your own.

Visual Basic format

Declare Function piut_setpassword Lib "piapi32.dll" (
ByVal username$,
ByVal oldpw$,
ByVal newpw$) As Long

C format

int32 PIPROC piut_setpassword(
char PIPTR *username,
char PIPTR *oldpassword,
char PIPTR *newpassword);




Not implemented (PI 2.1.1)


Not implemented (PI 2.1.0, PI 3.0)


Unsupported call (PI API 2016 or later)


No privilege to change password



username (passed)

Username whose password is to be changed.

oldpassword (passed)

Current password.

newpassword (passed)

New password.

Usage Notes

This function was first implemented in PI 2.1.2 and PI 3.1. Calling this function when connected to earlier versions of PI cause it to return one of the "not implemented" errors, depending on the type of connected PI System.

This function can be used to change the password in the PI user database only. Systems configured to use the VMS or UNIX user databases for system security cannot use this function.

To maintain network security, passwords are sent to the PI System in an encrypted format.

PI API 2016 for Windows Integrated Security

piut_setpassword() is not supported and will always return -10008 (Unsupported call)

Enabling Operational Intelligence