Change a RemoteApp Program icon in Windows 2012 R2 and Windows Server 2016 RD Web Access

Can we change the icon for a Published RemoteApp? Yes.

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 I 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.

Custom Icons in published RemoteApp Programs 01
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:
Custom Icons in published RemoteApp Programs 02
And there you have it: Custom icons on RemoteApp programs.

If you have a .ico file there’s no need to use powershell to change the icon.
Browse to %WINDIR%\RemotePackages\CPubFarms\CPubRemoteApps

on the server holding the RD Connection Broker role and you will see all the .ico files.

In the example for Windows Update Log I’d remove “notepad.ico” and instead copy a .ico file of my choice and rename it to “notepad.ico”.
This will replace the icon for the RemoteApp in your Remote Apps and Desktop Connections application on next refresh. For RD Web Access you’ll have to stop and start the Web application on the RD Web Access server.
This will only work for .ico files. If your icon is in a .exe or .dll you’ll still have to use powershell.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.