Setting your default printer in a Remote App

RemoteApps in windows are great. They let us manipulate the application environment easier and audit activity related to an application in a controlled geography. With more than one environment I have had reasons why the use of printer redirection was not ideal for an application and it needed to be shut off. In most cases we can predict or manage the printer settings for users in that scenario and use scripts to set the default printer based on a predefined security group of the user or the connecting computer. However, there are cases where you need a user to not have their default printer dictated to them, the application being published doesn’t allow you to change the default printer, the users are not permitted to open devices and printers on the RD server, and the users are not grouped in a way that makes their default printer assignment realistic.
This seems farfetched, right? Well, I have now run into two environments where these were all requirements.. So now the second time I’ve had to do this for a customer I should document it.
There isn’t any great breakthrough here, but I had to put some time into writing this so I thought that it may help somebody else out.
What I needed was a published RemoteApp that would let the user set their default printer for their session and would take affect immediately. I’m using VB in an hta file to create the form so it is not precompiled. To get the printers on the RD server we are using WMI. I am assuming better than W2000.

*******Edit attachment*****

A few people a month were asking me to send them this file directly, because they weren’t able to open from wordpress.

The PDF contains the text for the .hta file.




Filed under RD Gateway

3 responses to “Setting your default printer in a Remote App

  1. Nath Bix

    Gday Garney, any chance you still have that HTA app code floating around somewhere? The link is to a doc file that doesn’t exist any longer but I have the scenario you had and it looks like you have a viable solution here if I can get a hold of it haha.

    • I have an offline copy here but I need to test it to be sure that it was a working one. I’ll email the file zipped up and reattach it tomorrow when I’m at the office.
      Thanks for pointing the dead link out.

      • Nath Bix

        Thanks Chris, look forward to it! Client is a bit of a pain, don’t want to have to do a couple of extra clicks….

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s