Hi all, I’m Travis Howe, a developer on the Remote Desktop Virtualization team. Today I’d like to talk about a few improvements that we made to the RemoteApp and Desktop Connections feature in Windows Server 2012: support for default connections and file type associations.
When we added the RemoteApp and Desktop Connections feature in Windows Server 2008 R2 and Windows 7, many administrators wanted to be able to push connections to their users by using Group Policy. To help enable this, we supported a “silent install” API that allowed a user to be signed up for a connection without any prompts. Administrators had to push something like this script on Script Center to their users by using Group Policy.
In Windows Server 2012 and Windows 8, we improved this scenario. We have added a new Group Policy container under “Remote Desktop Services” called “RemoteApp and Desktop Connections,” and within that container have defined a new policy setting called “Specify default connection URL.” Enabling this policy setting causes users to be subscribed to RemoteApp and Desktop Connection at the specified URL. RemoteApp and Desktop Connections that have been installed by using this policy setting have a special name: default connections.
There are a few differences between default connections and ordinary connections:
- On a given machine, a user can only have one default connection.
- Default connections cannot be removed by using the Control Panel UI (the “remove” button does not exist for default connections). The only way to remove them is by changing the Group Policy setting.
- Default connections are able to install file type associations.
Support for file type associations is a somewhat deep subject, so I’ll spend the rest of this post talking about it in more detail.
One more note about default connections: they are unfortunately not supported on pre-Windows 8 clients. That means, if you want to push a RemoteApp and Desktop Connection to end-users running Windows 7 PCs, you must continue to use the script-based approach.
File type associations support: what does it mean?
So what do I mean when I say that default connections are able to install file type associations? When an administrator is publishing RemoteApp programs, they can also choose to publish file types that should be associated with that program. Then, when the RemoteApp program is installed as part of a default connection, we associate the RemoteApp program with those file types on the client machine.
The next time the user tries to open a file of that type, the standard Windows 8 file type association behavior will be used to determine which of the registered programs should be used to open the file. Often, the user will be given a choice. For example, if Microsoft Paint has been published as a RemoteApp program with the .bmp file type association, the user is presented with the following options.
There is one caveat with this feature: when deciding which file type associations to publish for a RemoteApp program, administrators can only choose from a list of available file types for that app. We calculate this list based upon the file types that the app is associated with on the collection endpoints (Remote Desktop Session Host servers in a session collection, or virtual desktops in a virtual desktop collection). This is necessary because when you double-click a file that is associated with a RemoteApp program, the endpoint also needs to know how to open that file type with that program. As a rule, it doesn’t have that information for arbitrary file types. As a result, we do not support associating RemoteApp programs with arbitrary file types on the client.
So, how exactly does one publish file type associations?
Publishing file type associations using UI
As I mentioned earlier, when a RemoteApp program is published, we calculate the list of file type associations that it can support when running as a RemoteApp program. To see this list, open up the properties of a published RemoteApp program in the new Server Manager UI, and navigate to the File Type Associations tab:
In the previous screenshot you can see the list of file types that Paint is capable of launching as a RemoteApp program. To publish file type associations for this RemoteApp program, simply select the file types that you want to be made available to end-users and click OK or Apply.
After you have published file type associations for your apps, they will automatically be installed for all users who are subscribed to the RemoteApp and Desktop Connection as a default connection. That installation will happen the next time the user’s client updates the connection (by default it updates every night around midnight).
Publishing file type associations using the Remote Desktop Services module for Windows PowerShell
This feature can also be managed by using the Remote Desktop Services module for Windows PowerShell. After loading the RemoteDesktop module by typing import-module RemoteDesktop, you can get the list of file type associations available to be published for a RemoteApp program by using the Get-RDFileTypeAssociation cmdlet:
import-module RemoteDesktop Get-RDFileTypeAssociation -CollectionName Test -AppAlias mspaint CollectionName AppAlias FileExtension IsPublished -------------- -------- ------------- ----------- Test mspaint .bmp False Test mspaint .dib False Test mspaint .emf False Test mspaint .rle False Test mspaint .wmf False
In the previous code sample we again see the list of file types that Paint is capable of launching as a RemoteApp program. To publish a file type association for this RemoteApp program, use the Set-RDFileTypeAssociation cmdlet:
Set-RDFileTypeAssociation -CollectionName Test -AppAlias mspaint -FileExtension .bmp -IsPublished $true
Get-RDFileTypeAssociation -CollectionName Test -AppAlias mspaint -FileExtension .bmp
CollectionName AppAlias FileExtension IsPublished
————– ——– ————- ———–
Test mspaint .bmp True
Test mspaint .dib False
Test mspaint .emf False
Test mspaint .rle False
Test mspaint .wmf False
Now we have published the file type association for “.bmp” files.
I hope this overview has been helpful and that now you have a better understanding of what makes the default RemoteApp and Desktop Connection different, and how you can leverage it to publish file type associations for your RemoteApp programs.