The "HKLM\Software\Citrix\ICA\Session" registry key
This registry key contains a number of extremely useful values including Client IP Address, Client Name and Client Version. These values can be used in any number of ways to tailor delivery of settings to the virtual desktop.
One example might be installing a printer onto thin clients sitting in a specific VLAN, you can target them with a group policy based login script by checking the "HKLM\Software\Citrix\ICA\Session","ClientAddress" REG_SZ value.
Mapping printers via Client Name
I prefer to target my printers via "ClientName". When I build a set of thin clients for a specific area, lets take the Library for example I name them VDIC-LIB01 LIB02 LIB03 (VDIC for VDI client and LIB to specify Library). Of course if you were doing a large number of clients it might be easier to put them in their own VLAN and target them by IP address with the "ClientAddress" value and forget about individually naming each client.
As I am using the Kixtart scripting language for my existing logon script I am going to leverage that for my virtual desktop printer mapping, my script for mapping a printer based on "ClientName" reads as follows.
$citrixcliname=READVALUE("HKLM\SOFTWARE\Citrix\ICA\Session", "ClientName")And here is an example based on "ClientAddress", it looks for "192.168.10" in the IP address.
If InStr($citrixcliname,"VDIC-LIB")
addprinterconnection("\\printserver.domain.local\LibraryStudent-Kyocera400kx")
SetDefaultPrinter("\\printserver.domain.local\LibraryStudent-Kyocera400kx")
endif
$citrixcliaddr=READVALUE("HKLM\SOFTWARE\Citrix\ICA\Session", "ClientAddress")This is an extremely simple but powerful way to target thin clients in specific areas and deliver any settings you want.
If InStr($citrixcliaddr,"192.168.10.")
addprinterconnection("\\printserver.domain.local\LibraryStudent-Kyocera400kx")
SetDefaultPrinter("\\printserver.domain.local\LibraryStudent-Kyocera400kx")
endif
Speeding up the mapping process
I strongly recommend you pre-install all the printer drivers you are planning to map as part of your login script into the virtual desktop image. This will dramatically cut down the printer mapping time as the driver is already installed. The different is something like 5-30 seconds per printer you are mapping, depending on how heavy the driver installation is.
No comments:
Post a Comment