Skip to main content

Overview

For production automation workflows, you’ll want Cyberdriver to start automatically when the Windows machine boots up. This ensures your machines are always ready for automation without manual intervention. This guide walks you through setting up Windows Task Scheduler to automatically run cyberdriver join when a user logs in.

Why “On Logon” and Not “On Startup”?

Windows runs startup tasks and background tasks in Session 0, which has no access to the interactive desktop. UI automation tools like Cyberdriver must run in a logged-in user session to interact with windows, send input, and capture screenshots. Tasks triggered “At startup” or configured with “Run whether user is logged on or not” run in Session 0—meaning Cyberdriver would start but have no desktop to automate. You have two options:
  1. Configure Windows auto-login - Bypass the login screen entirely so the machine boots directly to the desktop
  2. Manual login - Ensure someone logs in to each machine before automations need to run
For unattended automation, option 1 (auto-login) is strongly recommended. See Configuring Windows Auto-Login below.

Creating a Scheduled Task

1

Open Task Scheduler

Press Win + S and search for “Task Scheduler”, then open it. Alternatively, press Win + R, type taskschd.msc, and press Enter.
2

Create a new task

In the right panel, click “Create Task…” (not “Create Basic Task” — we need the full options).
3

Configure the General tab

In the General tab:
  1. Name: Enter a descriptive name like Cyberdriver Autostart
  2. Description: Optional, e.g., “Starts Cyberdriver and connects to Cyberdesk Cloud”
  3. Security options:
    • Select “Run only when user is logged on” (required)
    • Leave “Run with highest privileges” unchecked unless you specifically need admin access
Do not use “Run whether user is logged on or not” — this runs the task in Session 0 without an interactive desktop, which prevents Cyberdriver from seeing or interacting with any UI.
About “Run with highest privileges”: Most Cyberdriver workflows work best without elevation. Running elevated can cause UAC isolation issues and unexpected behavior. Only enable this if you need to automate applications that explicitly require admin rights.
4

Configure the Triggers tab

Click the Triggers tab, then click “New…” to create a trigger.
  1. Begin the task: Select “At log on”
  2. Settings: Choose “Specific user” and select the user account that will be logged in, OR select “Any user” if multiple accounts might be used
  3. Delay task for: Set to 30 seconds (recommended)
  4. Click OK to save the trigger
Adding a 30-second delay helps avoid race conditions where networking, the display driver, or the user profile isn’t fully initialized yet. This is especially important on cloud VMs, RDP/Citrix environments, and machines using virtual display drivers.
5

Configure the Actions tab

Click the Actions tab, then click “New…” to create an action.
  1. Action: Select “Start a program”
  2. Program/script: Enter the full path to cyberdriver:
    C:\Users\YOUR_USERNAME\.cyberdriver\cyberdriver.exe
    
    Replace YOUR_USERNAME with your actual Windows username.
  3. Add arguments: Enter your join command arguments:
    join --secret YOUR_API_KEY
    
    Replace YOUR_API_KEY with your actual API key from the Cyberdesk Dashboard.
  4. Start in (recommended): Set to:
    C:\Users\YOUR_USERNAME\.cyberdriver
    
    Without this, Windows defaults the working directory to C:\Windows\System32, which can cause unexpected failures with config files, logs, and relative paths.
  5. Click OK to save the action
Adding Additional FlagsYou can add any Cyberdriver flags to the arguments field. Common additions:
  • join --secret YOUR_API_KEY --keepalive — Prevents idle timeouts
  • join --secret YOUR_API_KEY --stealth — Explicitly enables stealth mode (default on Windows)
  • join --secret YOUR_API_KEY --experimental-space — For apps with space key issues
6

Configure the Conditions tab (optional)

Click the Conditions tab and adjust settings as needed:
  1. Power: Uncheck “Start the task only if the computer is on AC power” if you want the task to run on laptops even when on battery
  2. Network: You can optionally check “Start only if the following network connection is available” and select your network to ensure internet connectivity
7

Configure the Settings tab

Click the Settings tab and configure:
  1. Allow task to be run on demand: ✅ Check this (useful for testing)
  2. Run task as soon as possible after a scheduled start is missed: ✅ Check this
  3. If the task fails, restart every: Consider setting this to restart after 1 minute, up to 3 attempts
  4. Stop the task if it runs longer than: ❌ Uncheck this or set to a very long duration — Cyberdriver runs continuously
  5. If the running task does not end when requested, force it to stop: Leave unchecked
Critical: Cyberdriver is a long-running process. You must uncheck “Stop the task if it runs longer than” or it will be automatically killed after 3 days (the default).
8

Save and test the task

  1. Click OK to save the task
  2. If prompted for credentials, enter the password for the user account
  3. Find your task in the Task Scheduler Library
  4. Right-click the task and select “Run” to test it immediately
  5. Verify Cyberdriver started by checking:
    • Your machine appears online in the Cyberdesk Dashboard
    • Or run cyberdriver status in PowerShell

Verifying the Setup

After creating the task, test the full flow:
  1. Restart your computer or log out and log back in
  2. Wait 30 seconds for the task to execute
  3. Check the dashboard — your machine should appear online
  4. Run a test automation to confirm everything works
You can also check Task Scheduler’s History tab for your task to see execution logs.

Alternative: Using a Batch File

If you prefer more control or want to add custom logic, you can create a batch file that Task Scheduler runs:
1

Create the batch file

Create a file named start-cyberdriver.bat in a convenient location (e.g., C:\Users\YOUR_USERNAME\.cyberdriver\start-cyberdriver.bat):
@echo off
REM Wait a few seconds for network to be ready
timeout /t 10 /nobreak

REM Start Cyberdriver
cd /d "C:\Users\YOUR_USERNAME\.cyberdriver"
cyberdriver.exe join --secret YOUR_API_KEY --keepalive

REM If Cyberdriver exits unexpectedly, wait and retry
:retry
echo Cyberdriver exited. Restarting in 30 seconds...
timeout /t 30 /nobreak
cyberdriver.exe join --secret YOUR_API_KEY --keepalive
goto retry
2

Update the scheduled task

In the Task Scheduler action, point to the batch file instead:
  • Program/script: C:\Users\YOUR_USERNAME\.cyberdriver\start-cyberdriver.bat
  • Add arguments: (leave empty)
The batch file approach gives you built-in retry logic if Cyberdriver ever crashes, plus a delay to ensure the network is ready after login.
Cyberdriver enforces single-instance behavior, so the retry loop won’t accidentally spawn multiple instances. If Cyberdriver is already running, subsequent start attempts will exit gracefully.

Configuring Windows Auto-Login

For fully unattended automation, you’ll want Windows to log in automatically without requiring a password at the login screen.
Security Consideration: Auto-login means anyone with physical access to the machine can access the desktop. Only use this on secured machines or VMs in trusted environments.

Using netplwiz (GUI method)

  1. Press Win + R, type netplwiz, and press Enter
  2. Select your user account
  3. Uncheck “Users must enter a user name and password to use this computer”
  4. Click Apply
  5. Enter the account password when prompted (twice)
  6. Click OK
Windows 11 users: On some Windows 11 systems, the “Users must enter a user name and password” checkbox is hidden when Windows Hello sign-in is enabled. You may need to disable Windows Hello first (Settings → Accounts → Sign-in options) or use the registry method below.

Using Registry (alternative method)

For automated deployments, you can set auto-login via registry. Run these commands in an elevated PowerShell (Run as Administrator):
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Set-ItemProperty -Path $RegPath -Name "AutoAdminLogon" -Value "1"
Set-ItemProperty -Path $RegPath -Name "DefaultUserName" -Value "YOUR_USERNAME"
Set-ItemProperty -Path $RegPath -Name "DefaultPassword" -Value "YOUR_PASSWORD"
The registry method stores the password in plaintext. Only use this on secured VMs or machines in trusted environments.
After configuring auto-login, restart the machine to verify it boots directly to the desktop without stopping at the login screen.

Common Issues

Possible causes:
  • Incorrect path to cyberdriver.exe
  • Missing or invalid API key
  • Network not ready at login time
Solutions:
  1. Verify the path in the action matches where Cyberdriver is installed. Open PowerShell and run:
    Test-Path "$env:USERPROFILE\.cyberdriver\cyberdriver.exe"
    
  2. Check the API key is correct and active in your dashboard
  3. Add a startup delay: In the Triggers tab, edit the trigger and set “Delay task for” to 30 seconds
  4. Use the batch file approach with a timeout command for network readiness
Possible causes:
  • Firewall blocking outbound connections
  • Network connectivity issues at startup
  • Cyberdriver crashed after starting
Solutions:
  1. Check if Cyberdriver is actually running in Task Manager
  2. Look for errors in Cyberdriver’s log file: %LOCALAPPDATA%\.cyberdriver\logs\
  3. Test manually by running cyberdriver join --secret YOUR_API_KEY in PowerShell
  4. Ensure your firewall allows outbound connections to *.cyberdesk.io
Possible causes:
  • Task is disabled
  • Wrong user account selected
  • Trigger misconfigured
Solutions:
  1. In Task Scheduler, ensure the task status shows “Ready” not “Disabled”
  2. Check the task’s History tab for error messages
  3. Verify the trigger is set to “At log on” for the correct user
  4. Try setting the trigger to “Any user” to rule out user-specific issues
  5. Ensure “Run only when user is logged on” is selected (not “Run whether user is logged on or not”)
Possible causes:
  • UAC (User Account Control) settings interfering
  • User account doesn’t have admin privileges
Solutions:
  1. Try unchecking “Run with highest privileges” — Cyberdriver works without it for most applications
  2. Ensure the user account is a member of the Administrators group
  3. If you need admin access, try running Task Scheduler as Administrator when creating the task
Possible causes:
  • Invalid API key
  • Another instance already running
  • Cyberdriver update required
Solutions:
  1. Check Cyberdriver’s log file for error messages: %LOCALAPPDATA%\.cyberdriver\logs\
  2. Run cyberdriver stop to ensure no other instance is running, then try again
  3. Update Cyberdriver to the latest version:
    Invoke-WebRequest -Uri "https://github.com/cyberdesk-hq/cyberdriver/releases/latest/download/cyberdriver.exe" -OutFile "$env:USERPROFILE\.cyberdriver\cyberdriver.exe"
    
Possible causes:
  • Windows is entering sleep or hibernation
  • Screen saver or lock screen interfering
  • RDP session disconnecting
Solutions:
  1. Add the --keepalive flag to your Cyberdriver command to prevent idle timeouts
  2. Configure Windows power settings to never sleep (run in elevated PowerShell):
    powercfg -change -standby-timeout-ac 0
    powercfg -change -hibernate-timeout-ac 0
    
  3. Disable screen lock: Group Policy → Computer Configuration → Windows Settings → Security Settings → Local Policies → Security Options → “Interactive logon: Machine inactivity limit” → Set to 0
  4. For RDP sessions, use Cyberdriver’s Virtual Display feature
Cause: The scheduled task is set to run “At startup” instead of “At log on”, or Windows auto-login isn’t configured.Solution: Windows doesn’t allow automation software to interact with the login screen for security reasons. You must:
  1. Configure the task to trigger “At log on” (not “At startup”)
  2. Set up Windows auto-login so the machine boots directly to the desktop
  3. Or ensure someone manually logs in before automations need to run

Next Steps