If you sign in to your server to use one program, such as a trading terminal or a browser dashboard, it saves time when that program opens by itself. Windows gives you several ways to do this. They behave differently: some replace the desktop entirely, some run once per sign-in and some need administrator rights. This guide explains each method and when to use it.
Before you start
- A Windows VPS or Admin RDP server you connect to at
203.0.113.10:3389. - The full path of the program, for example
C:\Program Files\Mozilla Firefox\firefox.exe. Right-click the program's shortcut, choose Properties and copy the Target field. - Administrator rights if you want a program to start for all users.
Understand the options
- Startup folder (per user): the program opens every time that user signs in, with the full desktop. Simple and reliable.
- Startup folder (all users): the same, for every account on the server. Needs admin rights.
- Task Scheduler at logon: like the Startup folder, but with options such as a delay or running with higher rights.
- mstsc Programs tab or
.rdpalternate shell: the client asks the server to run one program instead of the desktop. When you close the program, the session ends.
For most people, the Startup folder is the right choice. Use the alternate shell only when you want a locked-down, single-app session.
Method 1: the Startup folder for your user
- Connect to the server and sign in as the user who needs the program.
- Press Win + R, type
shell:startupand press Enter. A folder opens at:
C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup- Right-click inside the folder and choose New → Shortcut.
- Browse to the program or paste its full path, then click Next and Finish.
The program now opens each time this user signs in. It does not start again when you only reconnect to a session that is still running, because you are not signing in again.
Method 2: the Startup folder for all users
- Sign in as an administrator.
- Press Win + R, type
shell:common startupand press Enter. This opens:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp- Create the shortcut there as above. Accept the administrator prompt if Windows asks.
Note: Every user who signs in will start the program. On a server shared by a team, check that the program can run more than once at the same time.
Method 3: Task Scheduler at logon
Use this when the program needs a delay, for example to wait for the network, or must run with highest privileges.
$action = New-ScheduledTaskAction -Execute 'C:\Program Files\Mozilla Firefox\firefox.exe'
$trigger = New-ScheduledTaskTrigger -AtLogOn -User "$env:USERDOMAIN\$env:USERNAME"
$trigger.Delay = 'PT30S'
Register-ScheduledTask -TaskName 'Open Firefox at logon' -Action $action -Trigger $triggerThis creates a task that opens Firefox 30 seconds after the current user signs in. Change the path and task name to suit. More options are in Use Windows Task Scheduler on your server.
Method 4: the mstsc Programs tab or alternate shell
This is set on your own PC, in the connection.
- Run
mstsc, enter203.0.113.10:3389and click Show Options. - Open the Programs tab.
- Tick Start the following program on connection.
- Enter the Program path and file name and, if needed, Start in the following folder.
- Save the connection on the General tab.
In an .rdp file the same settings are:
alternate shell:s:C:\Program Files\Mozilla Firefox\firefox.exe
shell working directory:s:C:\Program Files\Mozilla FirefoxThings to know before relying on it:
- You get the program without the Start menu or taskbar.
- Closing the program signs you out of the session.
- Whether the server honours the request depends on its edition and policy. Windows 10 and 11 desktops usually ignore it, and Windows Server can be set to ignore or override it. If nothing changes when you connect, use the Startup folder instead.
Warning: Do not use an alternate shell for a program that must keep running, such as a trading terminal. Closing it ends the session, and an accidental close stops everything. Use the Startup folder and leave the session disconnected instead.
Check it works
- Sign out of the server completely (Start → your user → Sign out), not just close the window.
- Connect again to
203.0.113.10:3389and sign in. - The program should open within a few seconds, or after the delay you set.
To list what starts at sign-in for your user, run in PowerShell on the server:
Get-CimInstance Win32_StartupCommand | Select-Object Name, Command, UserTroubleshooting
- Program does not start on reconnect: expected. Startup items run at sign-in, not when you reconnect to an existing session.
- Program starts twice: it is in both the per-user and all-users Startup folders, or also in a scheduled task. Keep one method.
- Program needs admin rights and shows a prompt: use Task Scheduler with Run with highest privileges instead of the Startup folder.
- Program must run after a reboot without anyone signing in: a Startup item will not do that. See Auto-start MetaTrader after a server reboot for the approach, which works for other apps too.
Next steps
- Keep your programs alive between sessions: Keep apps running 24/7 on your RDP server.
- Save the connection with its settings: Create and edit.rdp files: the settings that matter.
