ZCM 11 imaging megapost – part 3 (Novell Client)

windows 7 novell blog banner

The next part of the imaging series continues with a sysprepped image and drivers done – the next stage is to name the machine and install two key pieces of software in the Novell Client and ZCM Agent.

Setting machine name

Powershell gives us a lot of options for how to generate and set the name of the workstation. Some may prefer to do this using zisedit but I prefer Powershell as it ties in nicely with all the other processes that run after sysprep completes. How you name your machines is going to be specific to your network but here’s code snippets you might find useful…

Get machine IP address and subnet mask

$nic = gwmi -computer . -class "win32_networkadapterconfiguration" | Where-Object {$_.defaultIPGateway -ne $null}
$IP = $nic.ipaddress | select-object -first 1
$ClientMask = $nic.ipsubnet | select-object -first 1
Write-Host "IP address : " $IP -foregroundcolor "yellow"

We use the first section of the IP address to determine which site a machine is on, you can use the substring function for this e.g.

$Subnet = $IP.Substring(0,6)

Rename computer and set domain \ workgroup (I’ve only used this to set a workgroup so far so you’ll need to check how this works for domains)

$Computer = Get-WmiObject -Class Win32_ComputerSystem
$Computer.Rename( $wsname )
$sysInfo = Get-WmiObject -Class Win32_ComputerSystem
$sysInfo.JoinDomainOrWorkgroup( $workgroup )

One thing I did learn during this process is when comparing the value of a variable in an if statement you don’t use = as an operator as you might expect. It’s actually -eq

Ref: http://ss64.com/ps/if.html

If ($Subnet -eq "172.16") { $Site = "Site1" }
Else { $Site = "Site2" }

Also useful to note how to combine strings together to run commands with parameters or to dynamiacally generate machine names

The + operator joins strings without spaces…  
“Hello” + “World” will output HelloWorld

The , operator joins strings with spaces…

“Hello”, “World” will output Hello World

Novell Client Installation

If you use the Novell Client to login to your network you’ll need a lab machine to install it on first in order to generate a settings file to use for silent installation. This settings file allows you to distribute all the Novell settings for your network e.g. Treeless Login, set default login method to Novell etc during installation so the machine is ready to use without any additional config required.

Ref: http://www.novell.com/documentation/windows_client/windows_client_admin/?page=/documentation/windows_client/windows_client_admin/data/bu06bml.html

To do this download the latest version of the Novell Client, install to your lab machine and set it up as you normally would. Once done navigate to C:\Novell\Novell Client 2 SP3 for Windows\Admin then run nciman.exe The Install Manager screen should then open. Click Import Registry to load your current settings and make any tweaks if required. When done hit save and call the file settings.txt or something similar.

Building an installation folder

In the same way as with drivers I like to create an installation folder with all the files packaged up that I can easily import into Image Explorer to create an add-on image later on. Find somewhere accessible and create a folder called NOVELL_CLIENT (or similar) and copy the contents of C:\Novell\Novell Client 2 SP3 for Windows into it. At this point also copy the settings.txt file you created above in there as well.

Editing install.ini

You’ll also want to edit the install.ini file that’s in the root of the setup folder. This file governs the behaviour of the Novell Client setup program, some of the important settings I’ve changed include:

DisplayBackground=Yes
CreateSystemRestorePoint=No
ForceReboot=Yes

The DisplayBackground is quite handy as it brings up a large splash screen during the installation, handy so users don’t see a Windows desktop and think the computer is ready to use!

Importing the Novell certificate

During the client installation some form of driver gets installed, which by default Windows will pop up a dialog box asking for confirmation as the publisher isn’t trusted. This will obviously break a silent install so you’ll need to manually import the Novell certificate as part of your install script

Ref: http://www.novell.com/support/kb/doc.php?id=7008140

The instructions are nice and simple but where do you obtain the magical certmgr.exe tool? Answer is the Windows 7 SDK; yup that’s right you need to download a 567MB set of tools to get a utility that’s 70KB! Fortunately you don’t need to install the SDK to get the tool, use Virtual CloneDrive  or something similar to mount the ISO image, open the X:\Setup\WinSDKTools folder (where X: is your virtual CD drive letter) and run WinSDKTools_x86.msi

You’ll then find CertMgr.exe in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1\Bin – copy it to the Novell Client package folder above (I like to create a subfolder called novellclientcert in there but the choice is yours on that front). In the same folder place the Novell Publisher certificate you should have extracted after following the Novell instructions above.

Update: to save time you can use the built-in Windows 7 utility certutil as suggested here by Mike Morawski
http://www.migee.com/2010/09/24/solution-for-unattendedsilent-installs-and-would-you-like-to-install-this-device-software/

When done you should have everything you need for the installation so fire up Image Explorer and create your add-on image in the same way you did for drivers earlier on.

Powershell script

Using some of the methods from previous posts in the series we can then use Powershell to call the silent install. Note the paths to the files concerned, make sure yours match whatever folder structure you’ve used above! I had to add a 30-second wait at the start of the script as the sysprep autologin process seems to take a while and the installation actually completes before you get time to see it.

Note we don’t need to add a reboot command as the Client installation process will do that automatically

Start-Sleep -s 30
Write-Host "Importing Novell driver certificate to Trusted Publishers"
$CertCommand = "C:\SETUP\Novell_Client_2_SP3\nwclientcert\certmgr.exe"
$CertParams = "-add -c C:\SETUP\Novell_Client_2_SP3\nwclientcert\nwclient.cer -s -r localMachine trustedpublisher"
$process = [Diagnostics.Process]::Start($CertCommand,$CertParams)
$process.WaitForExit()
Write-Host "Certificate imported, proceeding to client installation"
# Start-Sleep -s 10
Write-Host "Installing Novell Client 2 SP3"
$ClientCommand = "C:\SETUP\Novell_Client_2_SP3\setup.exe"
$ClientParams = "/NCPF:settings.txt"
$process = [Diagnostics.Process]::Start($ClientCommand,$ClientParams)
$process.WaitForExit()

The next post will deal with the ZCM Agent 🙂

Advertisements

4 Responses to ZCM 11 imaging megapost – part 3 (Novell Client)

  1. dragon788 says:

    You might be able to update your solution to where you don’t have to download certmgr.exe. Simply use certutil which is included in Windows 7.

    http://www.migee.com/2010/09/24/solution-for-unattendedsilent-installs-and-would-you-like-to-install-this-device-software/

  2. gshaw0 says:

    Thanks for the suggestion, saves a bit of time which is always a welcome bonus. Added to the post with credit to the original author 🙂

  3. Thanks, useful documentation here too I’ll have to take a further glance when I get time 🙂

  4. Pingback: Field notes: delprof2 shutdown script | gshaw0

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: