Change a RemoteApp Program icon in Windows 2012 R2 RDS


To totally unlock this section you need to Log-in


Login

Can we change the icon for a Published RemoteApp? Yes we can. Open an administrative Powershell prompt and type the following command:

Get-RDRemoteApp -alias "notepad" | fl

This will show all properties for the RemoteApp with “notepad” as alias:

CollectionName      : RemoteApps
Alias               : notepad
DisplayName         : Windows Update Log
FolderName          : Logfiles
FilePath            : C:\Windows\System32\notepad.exe
FileVirtualPath     : C:\Windows\System32\notepad.exe
CommandLineSetting  : Require
RequiredCommandLine : c:\windows\windowsupdate.log
IconContents        : {0, 0, 1, 0...}
IconIndex           : 0
IconPath            : C:\Windows\System32\notepad.exe
UserGroups          :
ShowInWebAccess     : True

So, looking at these Properties we are able to change the icon here! This isn’t possible in the UI.

There are 2 properties to manipulate the icon:

IconIndex: the index for the icon you wish to show (0 if only 1 icon is available).
IconPath: the container holding the icon(s).

The IconPath setting can point to a .exe, a .ico, or a .dll file.

Let’s change the icon to an icon from shell32.dll. Why? Because we know for sure this file is available on all Windows installations.

Create a dummy shortcut or select an existing one. Change the icon and browse to c:\windows\system32. Select shell32.dll and select the Windows Update icon.

Change a RemoteApp Program icon in Windows 2012 R2 RDS

The IconIndex for this interface works top to bottom, starting with 0. So count the rows until you see your desired icon, multiply this by 4, subtract 1, and count up to your desired icon. The IconIndex for the Windows Update icon turns out to be 46.

Type one of the following commands in the Powershell box:

Get-RDRemoteApp -Alias "notepad" | Set-RDRemoteApp -IconPath "c:\windows\system32\shell32.dll" -IconIndex 46

or
Set-RDRemoteApp -CollectionName "RemoteApps" -Alias "notepad" -IconPath "C:\windows\system32\shell32.dll" -IconIndex 46

Now reload the RD Web Access role:

Change a RemoteApp Program icon in Windows 2012 R2 RDS

And there you have it: custom icons on RemoteApp programs.

NOTE: If your icon is in a .exe or .dll you will have to use Powershell. In alternative, only for .ico files, browse to %WINDIR%\RemotePackages\CPubFarms\CPubRemoteApps on the server holding the RD Connection Broker role and you will see all the .ico files.