Step by Step Customizing RD Web Access 2012 R2 – Part 4


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

which is all about publishing RemoteApp programs I figured I’d put this in a separate post.

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

Update:
As Chris Bigg says in the comments, 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.

About thangletoan

Hallo Aloha

Posted on 14/10/2012, in Remote Assistant, Remote Desktop, Remote Desktop Host Server and tagged , , , . Bookmark the permalink. Để lại bình luận.

Gửi phản hồi

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Log Out / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Log Out / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Log Out / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Log Out / Thay đổi )

Connecting to %s

%d bloggers like this: