Set the Execution Credentials for a Script
By default, scripts execute with the credentials of the logged on user. However, you can also configure a script to start using credentials different from the default ones. Basically, this is necessary for scripts configured to execute automatically when the Desigo CC project starts up.
- System Manager is in Engineering mode.
- The Change script credentials right is configured for your user group. See Check Scripts Application Rights.
- One or multiple scripts are available and enabled for execution.
- In System Browser, select Application View.
- Select Applications > Logics > Scripts > [scripts folder] > [script].
- The Script Editor tab displays.
- Click Set Execution Credentials .
- In the Script Editor dialog box, enter user name and password of the user that will execute the script under credentials.
NOTE: You must choose a user with the appropriate privileges.
- Click OK.
- When the credentials are valid, and the user is enabled, the username will be set for the manual or automated execution of this script.
- With invalid credentials, the following message displays in the Script Editor status bar:
Error while setting execution credentials
.
If the user is removed from the project after the Execute under Credentials property is set, an error is traced in the Trace Viewer, and the credentials are cleared from the script.
Clear the Execution Credentials for a Script
To reset the script credentials to the default settings, do the following:
- Select Applications > Logics > Scripts > [scripts folder] > [script].
- The Script Editor tab displays.
- Click Clear Execution Credentials .
- The user credentials are cleared. The script will once again execute with the credentials of the logged-in user.
NOTE: If the script was configured to execute automatically on project startup, clearing the credentials will also set its Execution Mode back to Manual.