Wednesday, February 22, 2012

Prepping Sanako clients for Ghost management

Using Ghost to manage lab machines is really straight-forward when the clients are using fairly standard software; however, things get interesting fast when specialized software is required for the computers. The Multimedia Language Center in the World Languages Department has one lab set aside for the use of Tandberg/Sanako language learning software. The vendor did the initial installation around 1999, which involved a complicated hardware remote desktop system integrated with VCR and cassette decks in addition to a file server and a database server. There are 21 clients and one teacher console in the lab. These computers all communicate directly with the file server, which holds mp3 files of phrases spoken in various languages, and the database server, which actually serves as an intermediary between the clients and file server. That requires a little more explanation: the file server is directly accessible from all clients, however, the database server provides a front end to each client to ease searching for files. If students are sophisticated enough, they can skip the db, called Library Pilot. Most, if not all, use the Library Pilot. A recent upgrade to the Sanako software was installed by the vendor, which apparently now utilizes a software-based remote desktop. The new version required the use of Windows XP in order to take advantage of all the software features, so the old Dell GX110s were fitted with more memory to handle the additional operating system requirements. New hardware was purchased to fully update the lab: 22 Dell Optiplex 745s. This provided the opportunity to understand the interdependencies better and switch the lab over from Hard Drive Sheriff (files restored locally) to Ghost.

Having been down this path before, some difficulties were expected. I’ve had issues with Quark, SPSS, and a few other applications. It took a week of testing and resetting, and testing again to determine that the Teacher Console and the clients are the hardest to set up (well, not anymore.) The Teacher Console (TC) has a file that maps MAC addresses to station numbers, which are displayed in a grid in the main Lab 300 window. The client has to report from two applications what its station number is: rclnt and the Duo player. It is possible to call up rclnt -ui and set the station number manually, but this does not propagate to the Duo player. Installing from the TC, as described in the manual, runs through a wizard that asks for the station number and sets both properly. It is even possible to run the set up again after installation to set the station number. That’s no good for managing with Ghost. We want to get an image from one machine and have the rest set themselves automagically.

The keys that need to be set are:

HKLM\SOFTWARE\Sanako\Shared Components\NetCommPlatform\Client\Client ID REG_DWORD 0x0000000y (y = station number in hexadecimal)
HKLM\SOFTWARE\Sanako\Shared Components\Common\ToLabNumber REG_DWORD 0x0000000y
HKLM\SOFTWARE\Sanako\Lab\Lab300\Duo\Common\ToLabNumber REG_DWORD 0x0000000y



I have no experience with Visual Basic Scripting, so my first (and hopefully last, yuck) script is below. It is super simple, would benefit greatly from a little regex and variable substitution, and won’t get any more love because it works. In a generic form, here it is:

set objShell = WScript.CreateObject("WScript.Shell")
station = objShell.RegRead _
("HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\ComputerName")
if station = "Room#-01" Then
objShell.RegWrite "HKLM\SOFTWARE\Sanako\Lab\Lab300\Duo\Common\ToLabNumber", 1, "REG_DWORD"
objShell.RegWrite "HKLM\SOFTWARE\Sanako\Shared Components\Common\ToLabNumber", 1, "REG_DWORD"
objShell.RegWrite "HKLM\SOFTWARE\Sanako\Shared Components\NetCommPlatform\Client\ClientId", 1,"REG_DWORD"
ElseIf station = "Room#-02" Then
objShell.RegWrite "HKLM\SOFTWARE\Sanako\Lab\Lab300\Duo\Common\ToLabNumber", 2, "REG_DWORD"
objShell.RegWrite "HKLM\SOFTWARE\Sanako\Shared Components\Common\ToLabNumber", 2, "REG_DWORD"
objShell.RegWrite "HKLM\SOFTWARE\Sanako\Shared Components\NetCommPlatform\Client\ClientId", 2,"REG_DWORD"
...
ElseIf station = "Room#-21" Then
objShell.RegWrite "HKLM\SOFTWARE\Sanako\Lab\Lab300\Duo\Common\ToLabNumber", 21, "REG_DWORD"
objShell.RegWrite "HKLM\SOFTWARE\Sanako\Shared Components\Common\ToLabNumber", 21, "REG_DWORD"
objShell.RegWrite "HKLM\SOFTWARE\Sanako\Shared Components\NetCommPlatform\Client\ClientId", 21,"REG_DWORD"
End If
objShell.RegWrite "HKLM\SOFTWARE\Sanako\Lab\Lab300\Duo\Path\Default Open Path", "\\someserver\someshare", "REG_SZ"

The client name is pulled from the ComputerName key, then a simple if/else block handles the rest. That’s how I roll when I can’t use a case block. Kidding, kidding. I used vbs because the script interpreter is built in and I thought that as much as I would have preferred to bust out a quick python script, this little task didn’t really justify installing the interpreter. That last line is the value of the default open path that appears when File->Open is selected in the Duo player.

The last thing to do is to add the Group Policy Object snap in to the MMC, open Computer Configuration->Windows Settings->Scripts, double click Startup, then click Add->Browse, find your script (I put it in the folder that Browse starts at), then click Apply. The script will run at each startup, it is small and fast enough that there isn’t really any performance hit on a 3.4GHz box to worry about :) If you are super uptight about those things, then configure it to run once and let it go. Just don’t forget to not run it before capturing an image.

If you are seeing weirdness like all the client requests showing up on the TC as station 1 or messages from the TC to the client going to the wrong client, double check your registry entries.

I have not configured the clients for Library Pilot. The media files are shared read-only and revert back to the top level of the share on each log in. I still have to figure out how to get it to revert after every use in the event that someone does not log out and someone else sits down to work (these are kiosk stations, no individual accounts). The other thing that I don’t have working is the intercom function between the TC and clients, but I suspect that this has to do with the hardware that integrates the VCR and cassette decks. One final note, Dell Optiplex 745s are not compatible with the Duo player because the onboard sound does not have a separate Microphone In. I used the Creative cards that were in the older Dell GX110s and they work fine.

As for firewall configuration, Sanako provides this document. The port numbers, off hand, are 6100, 6101, and 6102. I’ll have to verify these as I don’t have the notes handy.

No comments:

Post a Comment