Execute scripts manually with script buttons
Use script buttons in the UserClient to let users start scripts manually. This is useful when actions do not depend on a single predefined event or when users need interactive control.
Manual execution uses the same script structure as automatic execution:
- Scripts are deployed through Script management.
- An interface file provides context data.
- An initialization file defines button properties and permissions.
This section explains:
- How the interface file works for script buttons
- How to configure the INI file for buttons
- How to set up script buttons in the AdminClient
- How to use script buttons in the UserClient
Two types of scripts can run from buttons:
- Component-independent scripts run exactly once, regardless of the selected component.
- Component-specific scripts require a component to be selected and run once for each selected component. In this case, the system creates a component-specific interface file.
Rules for creating scripts
- Provide at least one script named
ScriptButton1.batorScriptButton1.exe. - You can configure up to three scripts independently of each other. Name them accordingly:
ScriptButton1.bat/.exe,ScriptButton2.bat/.exe,ScriptButton3.bat/.exe - Configure the label, tooltip, and icon for each button individually and language-independently (for example, in a script configuration file). You can provide label and tooltip texts in multiple languages.
- You can restrict button visibility and execution rights to specific user groups.
Display and execution
Buttons appear in the UserClient only if you have defined a script for them and the user has the required rights.
When the user selects a button, the system starts the script and displays a dialog showing which script is being executed.
- If the script runs successfully, the dialog closes and the UserClient updates to reflect any changes.
- If the script returns an error, the system shows an error message.
- If the script returns information, the system displays it in a dialog.
Related topics