RDP "alternate shell" not working

13

1

I've been trying to use the "alternate shell" option of RDP to start a remote program immediately after clicking in the .RDP file, but it isn't working for me: after starting the RDP session, the standard Windows shell shows up (like if the server is ignoring the "alternate shell" and "shell working directory" entries)

I'm using Win7 Professional as RDP client (MSTSC v 6.1.7600) and Win2008 Srv as server

This is my .RDP file:

screen mode id:i:1
desktopwidth:i:800
desktopheight:i:600
session bpp:i:16
auto connect:i:1
full address:s:192.168.1.5
compression:i:1
keyboardhook:i:2
audiomode:i:2
redirectdrives:i:0
redirectprinters:i:0
redirectcomports:i:0
redirectsmartcards:i:0
displayconnectionbar:i:1
username:s:Admin2
domain:s:AKA
alternate shell:s:C:\Windows\System32\notepad.exe
shell working directory:s:C:\Windows\System32
disable wallpaper:i:1
disable full window drag:i:1
disable menu anims:i:1

disable themes:i:1
bitmapcachepersistenable:i:1

PabloG

Posted 2011-07-27T19:08:28.890

Reputation: 819

I'm curious as to the answer to this as well. This seems like a pain in the rear to troubleshoot. – surfasb – 2011-07-27T22:16:53.453

Answers

6

Fixed using RemoteApp. For reference, here's the .RDP file generated with the Remote App wizard:

redirectclipboard:i:1
redirectposdevices:i:0
redirectprinters:i:1
redirectcomports:i:1
redirectsmartcards:i:1
devicestoredirect:s:*
drivestoredirect:s:*
redirectdrives:i:1
session bpp:i:32
span monitors:i:1
prompt for credentials on client:i:1
remoteapplicationmode:i:1
server port:i:3389
allow font smoothing:i:1
promptcredentialonce:i:1
authentication level:i:0
gatewayusagemethod:i:2
gatewayprofileusagemethod:i:0
gatewaycredentialssource:i:0
full address:s:192.168.1.5
alternate shell:s:||IVA
remoteapplicationprogram:s:||IVA
gatewayhostname:s:
remoteapplicationname:s:IVA.EXE
remoteapplicationcmdline:s:

PabloG

Posted 2011-07-27T19:08:28.890

Reputation: 819

Did you figure out why did you need the || ? – Carlos Sanchez Odreman – 2016-07-15T16:19:00.817

this snippet really works like a charm. thanks – Valerio – 2016-09-24T22:58:36.117

1

Doing this on Windows 10 Pro requires the following policy to be set: [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services] "fAllowUnlistedRemotePrograms"=dword:00000001 https://social.technet.microsoft.com/Forums/de-DE/84393b01-295e-4c4f-9477-b8b45a8e297b/how-to-setup-remoteapp-mode-for-some-application-in-windows-10-professional?forum=win10itprosetup

– Thorsten Schöning – 2018-06-08T11:03:37.333