109

Can RDP clients launch a remote application and then only display that application (and not the desktop)? The application would appear fullscreen within the client and if the application were closed the session would end.

ypnos
  • 50,202
  • 14
  • 95
  • 141
Richard Dorman
  • 23,170
  • 16
  • 45
  • 49
  • 3
    Just what I was looking for... thanks for asking! – Gishu Aug 31 '09 at 06:13
  • 1
    @user172681's answer provides the most up-to-date link. There is also now a nifty tool called 'RemoteApp Tool' (see links in updates section at the top of the page) for configuring your remote applications and generating the RDP files... worked perfectly for me on Win7. – John Rix Sep 19 '14 at 10:15

11 Answers11

48

"alternate shell" doesn't seem to work anymore in recent versions of Windows, RemoteApp is the way to go.

remoteapplicationmode:i:1
remoteapplicationname:s:Purpose of the app shown to user...
remoteapplicationprogram:s:C:\...\some.exe
remoteapplicationcmdline:s:

To get this to work under e.g. Windows 10 Professional, one needs to enable some policy:

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]
"fAllowUnlistedRemotePrograms"=dword:00000001
Thorsten Schöning
  • 3,501
  • 2
  • 25
  • 46
  • 7
    Just to add some precision: the above changes (from the first section) have to be made in the `.rdp` file itself, and the registry on the server. – picrap Jun 27 '18 at 09:20
  • For the record, there are two similarly named RDP keys: `remoteapplicationfile:s` and `remoteapplicationprogram:s`. The `*file` key specifies the full path to an executable on the **local (host)** computer, while the `*program` key specifies an executable on the **remote** computer. – Moshe Rubin Aug 30 '20 at 13:58
24

Using an RDP connection file you can set the alternate shell to be your application; the file syntax is like

alternate shell:s:c:\winnt\system32\notepad.exe

and you pass that as a command-line argument to mstsc.exe; this similar to chrissr's solution, but without affecting every RDP session you launch. A fuller summary of settings here.

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
Steve Gilham
  • 11,237
  • 3
  • 31
  • 37
23

This is quite easily achievable.

  1. We need to allow any unlisted programs to start from RDP.
    1.1 Save the script below on your desktop, the extension must end with .reg.
Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppAllowList]
    "fDisabledAllowList"=dword:00000001


       1.2 Right click on the file and click Merge, Yes, Ok.

  1. Modifying our .rdp file.
    2.1 At the end of our file, add the following code:
remoteapplicationmode:i:1
remoteapplicationname:s:This will be the optional description of the app
remoteapplicationprogram:s:Relative or absolute path to the app
                           (Example: taskmgr or C:\Windows\system32\taskmgr.exe)
remoteapplicationcmdline:s:Here you'd put any optional application parameters


Or just use this one to make sure that it works:
remoteapplicationmode:i:1
remoteapplicationname:s:
remoteapplicationprogram:s:mspaint
remoteapplicationcmdline:s:

        2.2 Enter your username and password and connect.


    3. Now you can use your RemoteApp without any issues as if it was running on your local machine

  • The excellent answer above uses the `remoteapplicationprogram:s` key to specify an application residing on the **remote** computer. To run a local, **host-side** application on the remote computer, use the `remoteapplicationfile:s` key instead. – Moshe Rubin Aug 31 '20 at 06:51
  • 2
    This works perfectly, only thing that wasn't 100% clear is that the reg has to be run on the remote machine – David Wilton Jul 12 '21 at 07:22
12

This is called "seamless" mode. rdesktop, the RDP client for Unix, is capable of this. From the manpage:

   -A     Enable SeamlessRDP. In this mode, rdesktop creates a X11 window for each window on the server
          side.  This  mode  requires  the  SeamlessRDP  server side component, which is available from
          http://www.cendio.com/seamlessrdp/.  When using this option, you  should  specify  a  startup
          shell which launches the desired application through SeamlessRDP.

See mentioned Cendio website for more information.

ypnos
  • 50,202
  • 14
  • 95
  • 141
6

Yes, you can change the default shell from Explorer.exe to a specific application.

In Regedit, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon. The current shell should be Explorer.exe. Change it to YourApp.exe. That will change the shell for all users who log on to the machine. If you only want to change it for a specific user, go to the same key in HKEY_CURRENT_USER instead.

chrissr
  • 9,861
  • 2
  • 29
  • 30
  • Note: Users will still be able to CTRL-Alt-Del and access other applications. You may want to disable CTRL-Alt-Del for the account or group that will be logging in via RDP. – chrissr Aug 16 '09 at 16:52
  • 5
    This effectively disables the user to log in regularly. – ypnos Aug 17 '09 at 15:25
3

This is called RemoteApp. To use it you need to install Terminal Services, which is now called Remote Desktop Services.

https://social.technet.microsoft.com/wiki/contents/articles/10817.publishing-remoteapps-in-windows-server-2012.aspx

AlexDev
  • 4,049
  • 31
  • 36
2

I think Citrix does that kind of thing. Though I'm not sure on specifics as I've only used it a couple of times. I think the one I used was called XenApp but I'm not sure if thats what you're after.

LiamGu
  • 5,317
  • 12
  • 49
  • 68
  • XenApp seems to be more about application virtualization than remote access (although I see it has remote option). I'm also looking for something in the open source camp (such as rdesktop). – Richard Dorman Aug 04 '09 at 14:22
  • 3
    Under the hood the key component of XenApp is still server-based computing (just as it was a decade ago when the product was called MetaFrame). It's just that marketing fashions have changed, and the product has broadened to contain more than just the app remoting core. – Steve Gilham Aug 17 '09 at 15:46
  • IIRC Microsoft further developed/upgraded their Terminal Server service using technology from Citrix, as it was much better in that regard. – Sam Sirry Dec 28 '22 at 03:53
2

Google for RemoteApp and only Windows Server 2016+ provides that. There is also a hack tool named "RemoteApp Tool" to enable RemoteApp support in Windows Pro editions/

Sefler
  • 2,237
  • 5
  • 19
  • 29
1

Another way is shown in this CodeProject article:

http://www.codeproject.com/KB/IP/tswindowclipper.aspx

The basic idea is to create a virutal channel that sends the windows position of the app(s) you want to show, then only render that part of the window on the client.

Jon Clegg
  • 3,870
  • 4
  • 25
  • 22
0

At least on 2008R2 if the accounts are only used for RDP and not for local logins then you can set this on a per-account basis. That should work for thin clients. If the accounts are also used on local desktops then this would also affect those logins.

In ADUsers&Computers, open the properties for the account and go to the Environment tab. On that tab, check "Start the following program at logon" and specify the path and executable for the program.

fencepost
  • 1,758
  • 1
  • 12
  • 9
-2

RDP will not do that natively.

As other answers have said -- you'll need to do some scripting and make policy changes as a kludge to make it hard for RDP logins to run anything but the intended application.

However, as of 2008, Microsoft has released application virtualization technology via Terminal Services that will allow you to do this seamlessly.

James
  • 1,788
  • 4
  • 22
  • 28