Automate Jar Execution at Login Using SOTI MobiControl on Windows Modern Devices
Summary
Related SOTI ONE Platform Products
Related Device OS
Situation
Users may need to execute a JAR application at login but may not be familiar with how to configure this using SOTI MobiControl. This demonstration involves two features:
- File Sync
- Scripts
For those unfamiliar with these features, please refer to the MobiControl help guide, which offers more in-depth information.
https://pulse.soti.net/support/soti-mobicontrol/
To enable the automatic execution of the JAR file, we will use the following two approaches:
- The behaviour of executing JAR files with the
javawsoption (Java Web Start Documentation). - The scripts are executed in the Startup folder in Windows (Configure Startup Applications in Windows). Attached is an image with a summary explanation.
Environment
Tested on SOTI MobiControl 2024.0 and SOTI MobiControl 2024.1 using Windows 10 and Windows 11 operating systems.
Process Description
Note: Test below script on one device prior applying on production devices. Refer Microsoft documentation to update the below script.
Execution of JAR on User Login
- Create a batch script on your local computer that includes the command to execute the JAR file silently using
javaw. This prevents the terminal from remaining open after execution.@echo off start javaw -jar C:\JavaFiles\HelloWorld.jar exit - Using FileSync, place the batch file in the recommended Windows folder:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup. This ensures that the script runs automatically at login. - Assign the FileSync policy accordingly and verify that it was successful. The batch file should now be in the Windows computer's Startup folder.
- With the batch file set up, the JAR should execute without issues when the user logs in. The CMD terminal will remain closed.
Was this helpful?
Thanks for your feedback