Start the Stream Agent automatically when the computer starts

After a power cut, a Windows update or a restart, the computer comes back to the Windows sign-in screen. The Eagle 3D Streaming Stream Agent cannot run without being on the desktop, so your link has no machine to stream from - no streaming is possible from that computer until someone signs in.

Two steps fix it:

  1. Windows signs in by itself.
  2. The Stream Agent starts as soon as Windows has signed in.
What you end up with

The computer starts, Windows signs in to your chosen account without anyone typing a password, and E3DS-Stream-Agent.exe starts by itself a few seconds later. Its window says Ready to stream.

Why is Windows sign-in required?

The Stream Agent runs your app on the computer's screen and streams that screen. A screen only exists once a user has signed in to Windows. While the computer waits at the sign-in screen, there is nothing to stream, so the first step is to let Windows sign in by itself.

Step 1 - Sign in to Windows automatically

Choose one of these two ways. Way A is the simpler and safer one.

Way A - the Autologon tool from Microsoft (recommended)

  1. Download Autologon

    It is a free, small tool from Microsoft Sysinternals: learn.microsoft.com/sysinternals/downloads/autologon. Unzip it on the streaming computer.

  2. Run it and enter the account

    Start Autologon64.exe (or Autologon.exe on 32-bit Windows). Fill in:

    • Username - the Windows account the Stream Agent will run under
    • Domain - the computer's name (it is filled in for you), or your company domain
    • Password - that account's password
    The Autologon window with Username, Domain and Password fields and the Enable button
    Autologon: enter the account, then press Enable.

    Press Enable. Autologon stores the password encrypted, not as plain text.

  3. Restart to check

    Restart the computer. It must reach the desktop without the sign-in screen. To switch it off again later, run Autologon and press Disable.

Way B - set it in the registry yourself

Use this only if you cannot run the Autologon tool. Here the password is stored as plain text in the registry, readable by anyone with administrator access to the computer.

  1. Open the Registry Editor

    Press Win + R, type regedit, press Enter, and allow it to make changes.

  2. Go to the Winlogon key

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  3. Set four values

    For each one: if it exists, double-click it and change it; if not, right-click > New > String Value, give it the name, then set it.

    Name (String value)Set it to
    AutoAdminLogon1
    DefaultUserNamethe Windows account name
    DefaultPasswordthat account's password
    DefaultDomainNamethe computer's name (or your company domain)

    The same in one go, from Command Prompt run as administrator (put your own values in):

    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d "StreamUser" /f
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d "YourPassword" /f
    reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d "%COMPUTERNAME%" /f
  4. Restart to check

    The computer must reach the desktop without the sign-in screen. To switch it off again: set AutoAdminLogon to 0 and delete DefaultPassword.

Step 2 - Start the Stream Agent with Task Scheduler

Windows now signs in by itself. Next, Task Scheduler starts the Stream Agent every time that account signs in.

  1. Open Task Scheduler

    Press Win, type Task Scheduler, open it. On the right, click Create Task... (not "Create Basic Task").

  2. General tab

    • Name: E3DS Stream Agent
    • When running the task, use the following user account: the same account that signs in automatically
    • Choose Run only when user is logged on - the agent needs the signed-in screen
    • Tick Run with highest privileges
    Create Task, General tab: name E3DS Stream Agent, Run only when user is logged on, Run with highest privileges ticked
    General tab: the task name, "Run only when user is logged on" and "Run with highest privileges".
  3. Triggers tab

    New... > Begin the task: At log on. On a computer that only streams, Any user is fine (or Specific user: the account that signs in automatically). Tick Delay task for and type 30 seconds so the network is ready first. OK.

    New Trigger window: Begin the task At log on, Any user selected
    Triggers tab > New: begin the task At log on.
  4. Actions tab

    New... > Action: Start a program.

    • Program/script: browse to E3DS-Stream-Agent.exe in the folder you unzipped, for example C:\E3DS-Stream-Agent\E3DS-Stream-Agent.exe
    • Start in: that same folder, for example C:\E3DS-Stream-Agent (no quotes)
  5. Conditions tab

    Untick Start the task only if the computer is on AC power (on laptops it would otherwise not start on battery).

  6. Settings tab

    • Untick Stop the task if it runs longer than - the agent runs all the time
    • If the task is already running: Do not start a new instance

    Press OK. If Windows asks for the account's password, enter it.

  7. Test it

    Restart the computer. Without touching anything, it signs in, and about 30 seconds later the Stream Agent window opens and says Ready to stream. Open your link to check that it streams.

Running it as a Windows service

The Stream Agent can also be run as a Windows service, which starts before anyone signs in. We have not tested that way much yet, so the Task Scheduler way above is the one we recommend. If you run it as a service and run into any problem, let us know - we will help you fix it so the Stream Agent works as a service on your computer too.

Related

Last updated