Set Service Credentials

Set the service credentials for a local service.

Privileges

Normal

Input Parameters

Name Type Required Description
Service String Yes The name of the service.
Account Type Selector Yes Select Local Service, Local System, Network Service, or User Account.
User Name String No The name of the user for the 'User Account' option.
Password String No The user password for the 'User Account' option.

Output Parameters

Name Type Description
Result Number Returns a success value of zero or any value other than zero to indicate failure.

Example Input Parameters

Name Type Required Example
Service String Yes Print Spooler
Account Type Selector Yes User Account
User Name String No Domain\username
Password String No Password!@#