Category filter
Deploy scripts to automate app deployment on Windows devices
While organizations may be able to easily ensure their workforce has the essential applications installed on their devices, some applications may require additional configurations, permissions, or specific system settings to function properly. For example, when installing an antivirus tool, IT administrators may need to configure specific settings and grant permissions for the tool to function properly. Without these adjustments, the installation might fail, or even if it succeeds, the app could operate with limited functionality, leaving all the essential features inaccessible. In such cases, deploying customized scripts can make the installation process more efficient. These scripts can automate pre-installation checks, post-installation configurations, and audit activities, streamlining the overall process. Using Hexnode’s Required Apps policy, IT admins can deploy scripts to automate the deployment of enterprise (MSI) apps on Windows devices.
Deploy scripts to automate app deployment with Required Apps
Customized scripts can be created to automate app deployment and address specific needs at different stages of the installation process. These scripts can be added through the Required Apps policy,
- Login to your Hexnode UEM portal.
- Go to Policies > New Policy to create a new policy or select an existing one. Enter a Policy Name and Description.
- Select Windows > App Management > Required Apps. Click Configure and then click +Add to add an enterprise (MSI) app from the list of apps.
- Select the required app from the list and click Done. Once the app is added, click Configure next to the app under the Custom Installation Settings column. There are three types of scripts you can configure based on your requirements,
- Pre-install Script: These scripts are executed before app installation to ensure the system meets all prerequisites for the application. If the pre-install script fails, the installation is canceled.
- Post-install Script: These are executed after the app installation. They are used for setting up application configurations, granting permissions, or installing additional components. If the post-install script fails, an error will be logged, but the installation will still be considered complete since the script runs after the application has been installed.
- Audit Script: These scripts are used to check files, folders, apps, and settings on the device to verify if the app has been correctly installed and configured. Failure of the audit script triggers re-installation if the audit script is customized in such a manner. However, the app installation will be successful.
- Upload a script from your device or select one from the Hexnode content repository. If the script requires arguments, enter them in the Arguments field, which also supports wildcards.
- Once done, click Save.
- After configuring the scripts, associate the policy with target devices or device groups.
You can also edit a script that has already been configured for an app. An ‘Edit’ option will be displayed next to the app.
Additionally, MSI installation settings can be configured directly from the Hexnode UEM console to customize deployment based on organizational requirements.
If one or more scripts are associated with an app, the deployment process follows this sequence:
- Executes the Pre-install Script.
- Performs the Install Application action.
- Executes the Post-install Script.
- Executes the Audit Script.
If no scripts are configured, the apps will be installed silently with the Required Apps policy.
How to check app deployment status via Hexnode UEM portal?
You can monitor the app deployment and script execution statuses for any Required Apps policy from the Action History tab on the device details page.
When a pre-install script fails, both the ‘Execute Pre-install Script’ and “Install Application” actions are marked as ‘Failed’ in the Action History tab of the device. Conversely, if a post-install script or an audit script fails, the ‘Install Application’ action is marked as successful, while the ‘Execute Post-install/Execute Audit Script’ actions are marked as ‘Failed’ actions in the Action History tab.
If there are no errors related to the scripts and the app package, both the ‘Install Application’ and ‘Execute Script’ actions are displayed as successful.