Script user interaction
The agent service runs scripts under the service process, where user interaction—such as dialogs or messages—is not supported.
Services start in session 0, which does not allow user interaction. Each logged-on user is assigned the next session.
When creating scripts for use with the system, ensure they do not require user or desktop interaction. Scripts that include these elements will fail or produce unexpected behavior.
Unsupported script types includ:
-
Scripts that display GUI components, such as running an installer in passive mode that shows progress or displaying pop-up messages.
-
Scripts that require mapped drive access. Even if a drive is mapped on the user’s station, the service process may need to remap it. Depending on configuration and permissions, the service might not have access to shared drives.
-
Scripts that rely on environment variables. For example, echo %appdata% expands to different paths depending on whether the script runs under the service or a user process.
What do you want to do?
- View the supported script types
- Check the requirements for returning Script results to the UI
- Parse Command Line Arguments to the script
-
Upload the Script to the N-sight RMM UI
- Deploy the Script on one of more devices
- Learn about the Windows Automation Manager
- View script Troubleshooting suggestions
- Read our scripting FAQs
