Automate Jar Execution at Login Using SOTI MobiControl on Windows Modern Devices

Publish Date: 06-Jan-2025 Last Modified Date: 27-Aug-2025 SOTI MobiControl
1312

Summary

This article outlines the process for automating the execution of JAR files upon user login on Windows Modern devices using SOTI MobiControl. The solution leverages the File Sync and Script features in SOTI MobiControl.

Related SOTI ONE Platform Products

SOTI MobiControl

Related Device OS

Windows Modern

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:

  1. File Sync
  2. 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:

Image from Microsoft documentation illustrating how to configure startup applications in Windows

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

  1. 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
  2. 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.
  3. Assign the FileSync policy accordingly and verify that it was successful. The batch file should now be in the Windows computer's Startup folder. Screenshot from a Windows computer showing the 'Startup' folder with a .bat script inside. 
  4. With the batch file set up, the JAR should execute without issues when the user logs in. The CMD terminal will remain closed.
    Image showing the successful execution of the JAR file specified in the startup script 

Was this helpful?