# Command Line Arguments

DR Sim Manager can be launched with command-line arguments to control its behavior at startup. This is especially useful for automation, scheduled tasks, and integration with tools like Stream Deck or Touch Portal.

***

## Location of the Executable

By default, DR Sim Manager is installed to:

```
C:\Program Files\DR Sim Manager\DRSimManager.exe
```

If you chose a custom install location during setup, navigate to that folder instead.

***

## Complete Argument Reference

| Argument            | Description                                                                                    |
| ------------------- | ---------------------------------------------------------------------------------------------- |
| `-minimized`        | Starts DR Sim Manager in a minimized state (to taskbar or system tray, depending on settings). |
| `-autostart`        | Automatically starts motion on launch. Requires both `-g` and `-p` to be specified.            |
| `-g <game name>`    | Selects the specified game on launch. Use the game's folder name (see below).                  |
| `-p <profile name>` | Selects the specified profile on launch. Use quotes if the name contains spaces.               |

### Argument Details

**`-minimized`** Starts the application minimized. If **Minimize to System Tray** is enabled in Settings, the application minimizes to the system tray. Otherwise, it minimizes to the taskbar. This is equivalent to the **Launch Minimized** setting but applied per-launch.

**`-autostart`** Automatically begins motion output as soon as the application finishes loading. Both `-g` (game) and `-p` (profile) must also be specified so the application knows which game and profile to use. Without them, autostart has no effect.

**`-g <game name>`** Selects a game source on startup. The game name must match the **folder name** used internally. To find the correct name:

1. Right-click in DR Sim Manager.
2. Select **Browse Profiles**.
3. The folder names shown correspond to game names (e.g., `DCSWorld`, `AssettoCorsaCompetizione`, `iRacing`).

**`-p <profile name>`** Selects a motion profile on startup. The profile name must match exactly (case-sensitive). Use quotes around names that contain spaces.

***

## Usage Examples

### Start minimized with a specific game and profile, auto-starting motion:

```
"C:\Program Files\DR Sim Manager\DRSimManager.exe" -minimized -autostart -g DCSWorld -p "Apache profile"
```

### Start with a specific game and profile, without auto-starting:

```
"C:\Program Files\DR Sim Manager\DRSimManager.exe" -g iRacing -p "Default"
```

### Start minimized only (no game/profile selection):

```
"C:\Program Files\DR Sim Manager\DRSimManager.exe" -minimized
```

***

## Setting Up Auto-Start with Windows

To have DR Sim Manager launch automatically when Windows starts:

1. Press **Win + R**, type `shell:startup`, and press Enter.
2. Right-click in the Startup folder and select **New > Shortcut**.
3. For the location, enter the full path to the executable with your desired arguments:

   ```
   "C:\Program Files\DR Sim Manager\DRSimManager.exe" -minimized -autostart -g DCSWorld -p "Default"
   ```
4. Name the shortcut (e.g., "DR Sim Manager Auto") and click **Finish**.

DR Sim Manager will now launch with your specified arguments every time you log in.

***

## Windows Shortcut Configuration

You can create a desktop or Start Menu shortcut with arguments pre-configured:

1. Right-click on the desktop and select **New > Shortcut**.
2. Enter the executable path: `"C:\Program Files\DR Sim Manager\DRSimManager.exe"`
3. Click **Next**, name the shortcut, and click **Finish**.
4. Right-click the shortcut and select **Properties**.
5. In the **Target** field, append your arguments after the executable path:

   ```
   "C:\Program Files\DR Sim Manager\DRSimManager.exe" -minimized -autostart -g BeamNG -p "Default"
   ```
6. Click **OK**.

<figure><img src="https://3709369602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs8Kv5cmJiQWNxCJtqRiq%2Fuploads%2FMMsUhByZJHRtBLSDQgAn%2Fimage.png?alt=media&#x26;token=6f3669ff-fd20-42c8-aabd-0b15efe959ef" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can create multiple shortcuts with different game/profile combinations — for example, one for racing and one for flight — and pin them to your taskbar or Start Menu.
{% endhint %}

***

## Stream Deck Integration

### Basic Setup

1. Add a **System > Open** action to a Stream Deck button.
2. In the **App / File** field, enter the full path:

   ```
   C:\Program Files\DR Sim Manager\DRSimManager.exe
   ```
3. Leave the path unquoted in the App / File field — Stream Deck handles quoting automatically.

{% hint style="warning" %}
You may see an error stating "The file cannot be accessed by the system" when browsing to the executable. Type or paste the direct path instead of browsing.
{% endhint %}

<figure><img src="https://3709369602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs8Kv5cmJiQWNxCJtqRiq%2Fuploads%2Fxe6Du9CtpXDXbxqimmp7%2Fimage.png?alt=media&#x26;token=4f6802db-2bc3-47e4-8055-57f7383885c7" alt=""><figcaption></figcaption></figure>

### Advanced Setup with Remote Control

For more flexible control (start, stop, pause, adjust gain), use the **Remote Control Interface** with Stream Deck's Multi-Action or System > Open actions to run PowerShell commands:

```
powershell "%userprofile%\AppData\Local\DRSimManager\RemoteControl\DRSM-WebSocket-Client.ps1" -Command "start"
```

See [Remote Control](https://docs.departedreality.com/dr-sim-manager/advanced/remote-control) for the full list of available commands.

### Stopping Motion Using a Macro

To stop motion and close the application with a single button:

1. Create a **Multi Action** on Stream Deck.
2. Add a **System > Open** action that runs the stop shortcut (or use the PowerShell client to send a stop command).
3. Add a short delay (2–3 seconds).
4. Add another action to kill the process.

***

## Touch Portal Integration

Touch Portal can execute command-line applications directly:

1. Create a new button in Touch Portal.
2. Add an **Action > Run Application** action.
3. Set the application path to:

   ```
   C:\Program Files\DR Sim Manager\DRSimManager.exe
   ```
4. Set parameters to your desired arguments:

   ```
   -minimized -autostart -g iRacing -p "Default"
   ```

For advanced control, use the PowerShell WebSocket client via a **Run Shell Command** action:

```
powershell "%userprofile%\AppData\Local\DRSimManager\RemoteControl\DRSM-WebSocket-Client.ps1" -Command "start"
```

***

## Combining with Other Features

* **Kiosk Mode + Auto-Start:** Use `-minimized -autostart` with the **Launch in Kiosk Mode** setting to create a fully automated, locked-down setup for commercial venues.
* **Remote Control:** Use command-line arguments for initial setup, then switch to the [Remote Control](https://docs.departedreality.com/dr-sim-manager/advanced/remote-control) interface for ongoing control from a phone or tablet.
* **Multiple Shortcuts:** Create different shortcuts for different games/profiles and pin them to your taskbar for quick access.
