Tuesday, 9 March 2010

How to disable the "Print Dialog" window with XenApp plugin for Mac

I have a client using some Apple Macs to connect to a Citrix XenApp farm. All was working except an annoying "print dialog" pop-up window whenever a print job was sent. This Citrix article states "This feature may be enabled or disabled under the File menu of the Citrix ICA Client".
But our client is using the XenApp plugin, not the full XenApp client and this article is not relevent for the plugin, only the full client.

What I was after was a way to disable this feature in the Mac plugin and this is the solution, with much thanks to Citrix Support:

Using Terminal, type the following command (PSShowPrintDialog must be typed exactly as shown):

DEFAULTS WRITE COM.CITRIX.ICACLIENT PSSHOWPRINTDIALOG NO

When the Client is launched it reads the setting, so restart the Client if it is already running for it to see the change.


My goal is always to remove any manual steps so I asked Citrix if this setting could be automated, and one option (which I have yet to test) is to create a simple Apple Script as follows:
do shell script "defaults write com.citrix.icaclient PSShowPrintDialog NO"

This can be made using Script Editor which can be found in Applications -> AppleScript (just copy and paste the command above). The script can be saved as an application for anyone to use (and could be set to run at start-up using System Preferences if required, or linked on the Web Interface site).

Thursday, 17 September 2009

CPU and memory load generation scripts

I was asked today how to generate CPU and memory load on a Windows server. I remembered from my VMware ESX training a VBScript which generated load on the CPU, but had never seen a script to stress memory. So I hacked together a VBScript which has an infinite loop which just keeps creating large arrays and filling them with data. Eventually the script bombs with an out of memory error, just what I was after!
Feel free to use the CPU loading script (thanks to VMware and Xtravirt) and memory loading script but please do NOT use them on production systems!

The password store on Windows 2008 / Vista

I always recommend a profile management system for Citrix XenApp installations; the free Flex Profile Kit is a favourite, but I recently implemented AppSense Environment Manager (EM) for profile management on Windows 2008 Server and found that Internet Explorer passwords were not being saved. After some investigation I found that the password store is handled very differently in Windows 2008 Server and Vista.
In Windows 2008/Vista the password store in the user's profile is not roamed, even though it is in the roaming folder... that makes lots of sense...
From what I can gather the Microsoft method is to use Certificate Services which is configured via GPO and saves credentials to the user's AD object. See this article and this article.
From an AppSense EM perspective the "Manage Certificates" personalisation option saves IE passwords, so this is the easiest option.
A second method of saving IE passwords using AppSense or Flex Profiles is to save the Protect folder from the user's profile at logoff and restore it at logon. I have tested this and it works perfectly.
The piece of data that needs to be saved from the user's profile is the folder %userprofile%\AppData\Roaming\Microsoft\Protect

Friday, 31 July 2009

Run cmd as SYSTEM on Windows 2008 Server

Thanks to Jarvis for this one, to run a cmd window as the SYSTEM account on Windows 2008 Server, download PSExec from Microsoft and use this command:
psexec -i -s %comspec%

The previous method using AT does not work with Win 2008, nor does the schtasks command in Win 2008 do the job either.

Easy when you know how.

Thursday, 30 July 2009

Full hard drive on Windows 2008 Server

Today a production XenApp 5 Windows 2008 Enterprise Server ran out of disk space. I only added it to the farm yesterday at which time it had 18GB of free space, so I knew something odd was up. Checking the folder sizes it only took a few minutes to find the culprit:
%windir%\system32\spool\spooler.xml

This file was 18GB and the cause of the low disk space. Stopping the print spooler allowed me to delete the file and a Google search quickly explained how to stop this from occurring again, see here and here - basically it's Windows Error Reporting going nuts.

I'm adding this to the build for all Windows 2008 Server installs so this doesn't occur again:
reg add HKLM\System\CurrentControlSet\Control\Print /v DisableWERLogging /t REG_DWORD /d 1

Sunday, 17 May 2009

Client hypervisors, are they the missing VDI link?

Citrix recently announced XenClient, their client side bare metal hypervisor. VMware announced their client hypervisor back in February and I would not be surprised if Microsoft was also developing a product. A bare metal (or type 1) hypervisor is a virtualisation layer which is installed directly on your hardware. Most of us are familar with server virtualisation, well client hypervisors are simply applying the same technology to desktops and laptops. A client hypervisor is more challenging to develop though due to the much broader hardware support needed: think graphics, audio, USB, firewire etc.
So what's the point? Why the race to bring out a client hypervisor? Because the client hypervisor could be the missing piece of the VDI puzzle. Today, if you implement a VDI solution what do you do with your mobile users or power users who need more resources than VDI can provide? Nothing, you leave them running a locally installed OS which is a different image (or possibly several images to accommodation hardware flavours) to the VDI users. This means greater management effort and costs as well as more difficult and complex troubleshooting.
In the client hypervisor world everyone in your organisation can run the same OS image whether connected to a server based VDI instance or on a physical laptop or desktop. This will drastically simplify environments with follow on cost savings.
Bring it on I say! I can't wait to try out a client hypervisor.

Wednesday, 29 April 2009

Citrix Stats using PowerShell and SQL

Wow, I like what Alain has done with some PowerShell/SQL/Visual Studio tricks. I can see how this could be turned into a farm trending/capacity management tool. Check it out here.