Pages

Sunday, February 19, 2012

Enabling "Autoconnect USB Devices" for VMware View Client with Active Directory Group Policy

I find that most often than not, I would always want to have the VMware View virtual desktops automatically connect USB devices that users plug into their physical desktops or thin-clients but as some of you may already know, the default setting for the VMware View Client is to actually not automatically USB devices that users plug in:

image

Users are able to manually enable this themselves from the VMware View Client toolbar which will then be remembered for the next time they log on. 

image

So what if we wanted this setting to be enabled regardless of whether the end user has turned it on?  The answer is to use Active Directory Group Policy with the VMware supplied vdm_client.adm template.

Open up Group Policy Management Console and create a new policy linked to the physical desktops or thin-clients (if they’re joined to the domain):

image

Highlight the Administrative Templates node click on the Action tab and add the vdm_client.adm template:

image

Navigate to Computer Configuration –> Administrative Templates –> Windows Components –> VMware View Client Configuration –> Scripting Definitions and enable the following 2 settings:

  1. Connect all USB devices to the desktop on launch.
  2. Connect USB devices to the desktop when they are plugged in.

image

Once the settings have been configured, close the Group Policy Object Editor and you’ll be able to review the policy settings under the policy’s Settings tab:

image

Proceed with refreshing the policy of the desktop or thin-client and log on and off if necessary.  Once you connect to the virtual desktop, you should now see the Autoconnect USB Devices option grayed out with a checkmark beside it:

image

Note that users will no longer be able to disable this feature.

Saturday, February 18, 2012

Extracting the msi file from VMware View Client installation executable and installing it via Active Directory Group Policy

Problem

You have to deploy VMware View Client on a number of Windows XP workstations and installing the client manually is not an option because there are too many workstations in the environment.  Then environment does not have Microsoft SCCM or any other enterprise deployment software and the only option you have is Active Directory’s native Group Policy.

Solution

As much as I don’t like using Group Policy to deploy software packages, I have worked in environments that gives me no choice but to use it as a way deploy the VMware View Client because there are simply too many workstations to manually install it.

The first step prior to setting up the Group Policy retrieve the msi and respective files required for the installation of the VMware View Client so start off by executing the VMware-viewclient.exe file to bring up the following splash screen:

image

**Note that for the purpose of this example, I’m using the 32-bit version of the VMware View Client and assigning it to Windows XP 32-bit desktops.

Once the VMware View Client installation splash screen displays on your screen, open the run window and type in %temp% and then hit enter:

image

In the opened Windows Explorer window, look for a folder with a unique identifier ending with the string ~setup:

image

Navigating into the folder will show the following 7 files:

  1. Core.cab
  2. instmsiw.exe
  3. ThinPr~1.cab
  4. TSSO.cab
  5. USB.cab
  6. vcredist_x86.exe
  7. VMware View Client.msi

image

You’ll need all of these files for the installation so copy the files onto a file server and share the folder out.

Next, create an OU in your Active Directory that you will be putting your computer accounts in to deploy the VMware View Client.  The idea here is that we’ll move the computers that need to have the client installed and once the client has been installed, we’ll be moving it out.  I’ve always preferred to deploy software packages with Active Directory this way because you don’t want this policy continuously checked against the workstations when they boot up:

image

Next, open up Group Policy Management Console and create a new policy for the OU:

image

image

image

image

Proceed with editing the policy:

image

Navigate to the node Computer Configuration –> Software Settings –> Software installation and then right click in the right window, select New –> Package:

image

Within browser, navigate to the VMware View Client.msi file via the UNC path:

image

Once you’ve clicked on the Open button, you’ll be prompted with the following window.  Select the Assigned radio button and click OK:

image

As shown in the screenshot, the msi package has now been published:

image

Proceed with moving a computer object into the OU to test the deployment:

image

Log onto the workstation and execute gpupdate /force to force a refresh of group policy.  Once the group policy refresh has completed, execute a gpresult on the workstation and make sure the policy has been applied to the workstation:

image

Once you have confirmed that the policy is applied to the workstation, proceed with logging off and back on or restarting the workstation.  The package will then proceed to install.

Note that this setup installs with default parameters with no default connection server and other customization settings available to you when you manually install the package.  I haven’t looked into publishing the msi package with customized switches as the wizard does not natively allow you to add switches so I usually just use another GPO to apply the settings.

Using Group Policy Preferences in a Windows 2003 domain without 2008 domain controllers

As most administrators would know, Windows 2008 domain controllers offers the new Group Policy Preferences which includes more than 20 new Group Policy extensions that expand the range of configurable settings within a Group Policy object (GPO).  I came across the need for this during a VMware View deployment when I wanted a simplified way of mapping printers as I wanted to get away from using vbs scripts or batch files.  The problem, as the title of this blog post states, is that the domain I was working with was still Windows 2003 and there were no 2008 domain controllers.  Due to the lack of 2008 servers, I was forced to use a Windows 7 desktop operating system virtual machine to deploy KMS and since I had already dedicated this virtual machine for KMS to serve as a server, I went ahead and used it to make the Group Policy Preferences available.

The first step is to install the Remote Server Administration Tools for Windows 7 with Service Pack 1 (SP1) from the following link:  http://www.microsoft.com/download/en/details.aspx?id=7887

Once you’ve installed the Remote Server Administration Tools for Windows 7 with Service Pack 1 (SP1), you’ll need to turn on the Remote Server Administration Tools by opening up Programs and Features then click on Turn Windows feature on or off:

image

Within the Windows Features window, select Remote Server Administration Tools and Group Policy Management Tools:

image

Continue by clicking OK to install the features.  Once complete, download the Group Policy Preferences in Windows Server 2008 Client Side Extensions for the operating system you’re using from the following link: http://support.microsoft.com/kb/943729

image

**Note: For the purpose of this example, we’re downloading Windows Vista, 32-bit edition because I’m installing this onto a Windows 7 32-bit operating system.

Once you’ve downloaded the file, proceed with installing it:

image

image

image

image

Once installed, you should see it listed in your Programs and Features window:

image

Now that you have the administrative templates installed open up the Group Policy Management from Administrative Tools:

image

Once the Group Policy Management Console opens, you can proceed with creating a new policy and when you open up the Group Policy Management Editor, you should now see the Preferences, Control Panel Settings and Printers nodes under:

User Configuration –> Preferences –> Control Panel Settings –> Settings –> Printers

image

I really like this simplified way of mapping printers rather than using scripts and having to configure the loop back settings of how the policy is applied.  What’s worth noting if you’re using this for your VMware View desktops is that if you have redirected printers left on (they’re on by default), your View desktops will most likely default to your redirected default printer and NOT the default printer you set in this policy.  If you want this changed, you can refer to one of my previous posts:

Disabling redirected printers for VMware View Virtual Desktops
http://terenceluk.blogspot.com/2012/02/disabling-redirected-printers-for.html

Friday, February 17, 2012

Directing a Web Interface 5.4’s “INSTALL” link to a direct download link for a plug-in

Problem

You would like to direct the INSTALL link that is presented by your Web Interface 5.4 server when a Citrix client isn’t detected directly to a link that downloads a specific client.

image

Solution

Note that this solution may not work in every environments because if your enterprise network consists of different operating systems (Windows, Macs) or browsers (IE, Safari, Mozilla) then forcing the user to download a specific client may mean that they’ll get a client that is not compatible with their operating system.

For the purpose of this example, we’ll be changing the Install link to point to the Citrix Receiver executable stored on the Web Interface server that will allow the user to Run or Download the file:

CitrixReceiverEnterprise.exe

image

Log onto your Web Interface server and browse to:

C:\inetpub\wwwroot\Citrix\XenApp\Clients

image

Copy the plug-in into the folder:

image

Browse to the following folder:

C:\inetpub\wwwroot\Citrix\XenApp\conf

image

Open the following file with notepad:

WebInterface.conf

image

Change the following path:

# ClientDefaultURL=http://www.citrix.com/download

image

To:

ClientDefaultURL=http://<yourWebServer>/Citrix/XenApp/Clients/CitrixReceiverEnterprise.exe

image

A restart of the services is not necessary so just refresh the Web Interface page with a workstation that does not have a plug-in installed and you’ll notice that the INSTALL link now points you directly to a link to download the Citrix Receiver client. 

image

How do I change the default plug-in “INSTALL” link from “http://www.citrix.com/download” to a different URL on a Web Interface 5.4 server?

This didn’t take me too long to figure out but I noticed that a lot of the hits on Google brings you to Web Interface version 4.x Citrix KBs so I figure writing this post would allow me to reference to in the future as well as others who may be looking for this information.

To change the default plug-in INSTALL link:

image

… from http://www.citrix.com/download to a different URL, simply log onto your Web Interface server and navigate to:

C:\inetpub\wwwroot\Citrix\<yourXenAppSite>\conf

… use notepad to open up the file named:

WebInterface.conf

image

… search for the string:

# ClientDefaultURL=http://www.citrix.com/download

image

… then remove the # and change the http://www.citrix.com/download to the URL you want.

Thursday, February 16, 2012

Accessing Citrix XenApp 6.5 over Web Interface 4.6 through Citrix NetScaler VPX 9.3 configured as an Access Gateway throws the error: "401–Unauthorized: Access is denied due to invalid credentials.” and “You do not have permission to view this directory or page using the credentials that you supplied.”

Problem

You’ve completed the configuration of your Citrix NetScaler VPX 9.3 as an Access Gateway to your internal Web Interface servers but when you attempt log in:

image

… the web interface login splash page flashes and you receive the following error:

image

Solution

This error is usually related to your Web Interface servers unable to communicate to your NetScaler VPX’s VIP IP.  Ensure that the firewall or web filter between your Web Interface server and your NetScaler VPX’s VIP (usually a DMZ or public IP) is allowing port 443 (SSL) traffic through.  The easiest way to test is to log directly onto your Web Interface server and try to initiate a “telnet <NetScaler VIP> 443”.  If you are unable to establish a connection over then check to ensure traffic is flowing correctly.

Accessing Citrix XenApp 6.5 over Web Interface 4.6 through Citrix NetScaler VPX 9.3 configured as an Access Gateway throws the error: "The website declined to show this webpage" and "HTTP 403"

Problem

You’ve completed the configuration of your Citrix NetScaler VPX 9.3 as an Access Gateway to your internal Web Interface servers but when you attempt log in:

image

… you receive the following error:

The website declined to show this webpage

HTTP 403

Most likely causes:

This website requires you to log in.

What you can try:

Go back to the previous page.

image

Solution

The problem is caused by the following configuration under your Access Gateway Session Profile –> Security:

image

Check the Override Global checkbox and change the Default Authorization Action to Allow:

image