ZCM Imaging - Installing the ZEN Adaptive Agent in the image

0 Likes

Creating the Image



Instructions for preparing the PC for creating a ZEN Image.


  • Boot up PC.

  • Remove Zen Adaptive agent & reboot - tell it to remove machine from zone.

  • Download full Zen agent to local disk

  • Disconnect NIC

  • Run the Agent, but DON'T reboot at end.

  • Run REGEDIT

  • Browse to HKLM\Software\Novell\Zenworks\PreAgent and delete the GUID entry

  • Browse to HKLM\Software\Novell\Zenworks\Remote Management\Agent and delete any subkeys with machine names on them.

  • Browse to HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\System and remove the entry pointing at ziswin.exe (Leave the System key in place)

  • Run C:\Program Files\Novell\Zenworks\Bin\Preboot\ziswin

  • Click Edit, clear imagesafe data, and save - Click No to the question about "just imaged" if asked

  • Run sysprep -mini -quiet -reseal - this will prep the machine and switch it off.

  • Cut image.



Scripts



SYSPREP is set to auto login as the last used user-id (which should be the admin account you used to run SYSPREP) twice - The script files modify the registry to run certain commands in sequence.

The attached ZIP file contains some scripts which need modifying as follows:

Edit the sysprep.inf and enter the following details where relevant:

[GuiUnattended]
AdminPassword=ENTER LOCAL ADMIN PASSWORD HERE

[UserData]
ProductKey=ENTER YOUR PRODUCT KEY HERE
FullName="ENTER FULL NAME HERE"
OrgName="ENTER ORG NAME HERE"



Under the Compaq Folder, edit the install2.cmd as follows:

netdom /d:<DOMAIN NAME> /u:<DOMAIN ADMIN ACCOUNT> 
/p:<PASSWORD FOR DOMAIN ADMIN ACCOUNT> MEMBER /JOINDOMAIN



SYSPREP - 1st Reboot.



On 1st reboot, the script C:\COMPAQ\install.cmd is executed. This runs a HP/Compaq utility to obtain the BIOS information to assist in renaming the machine based on the BIOS Asset Tag. Obviously if you use any machines other than HP/Compaq, you'll need to replace this with an equivalent utility.

This then calls the script getassetno.pl which sets the Windows Machine name to the BIOS Asset Tag.

The registry is then updated to call install2.cmd at next reboot, and the machine is then rebooted.

SYSPREP - 2nd Reboot.



The 2nd Reboot again updates the registry, this time to put the ZISWIN call back into the system so that its called each time the machine is booted.

The PC is then added to the domain, and a couple of Local Groups are updated (feel free to update as required for your own purposes), and then the PC is rebooted for the final time.

Hope this helps.

Labels:

How To-Best Practice
Collateral
Comment List
  • I'm starting to use 64 bit as my image platform, are there any plans to update this cool solution to reflect the needs for the 64 bit platform?
  • Hello I was trying to use your steps to prepare an image for Windows 7 however came across the following issues:

    These two registry keys don't exist:

    Browse to HKLM\Software\Novell\Zenworks\Remote Management\Agent and delete any subkeys with machine names on them.
    Browse to HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\System and remove the entry pointing at ziswin.exe (Leave the System key in place)

    I have just ignored them, but wanted to know what if anything in the registry needed changing?

  • in reply to MigrationDeletedUser
    Hello,
    I just downloaded imagescripts.zip and unpacked it with Total Commander. I got 2 folders (compaq and sysprep) with one perl file, some bat files and some exe files.
    Looks o.k. to me.
  • Hi,
    downloaded the imagescripts.zip, unpacked them with 7zip and tried opening the
    resulting file with an editor. Only ununderstandable code is shown. Is this done
    with a particular compiler that is not mentioned above.

    Thanks
    Mike
  • These steps are right on, but i think we need to specify that you CAN NOT reboot whatsoever after you install the agent. What i do is make this my last step in my base image setup, not plugged into network at all, just manually install client, and do all of these steps then. Then i do mini-setup, reseal, shutdown and plug into network and make base image. OVERALL, EXCELLENT STEPS..THANK YOU
  • in reply to MigrationDeletedUser
    Hi, this is how I have been trying to do mine except it won't install properly unless I log in to Windows as a user.

    In my sysprep.inf file I have:

    [GuiRunOnce]
    Command0="%systemdrive%\temp\install.bat"


    Which is calling this script to install the Novell Client and the Zenagent:

    REM install novell client
    start "novell" /wait "%systemdrive%\temp\491sp5\acu.exe" /U /D:no

    REM install zenworks client
    start "zenworks" /wait "%systemdrive%\temp\PreAgentPkg_AgentComplete.exe" -q -x


    The script runs after the sysprep mini and the Novell client installs but the zenagent doesn't complete. I even tried making the install.bat pause for 10 minutes just incase it was still waiting but that didn't fix it. Have I got the wrong syntax? How are you doing it?

    Thanks :)
  • For my part, I have an add-on image that I can modify to update the current agent so, when a new system-update is launched in production, I just update my add-on image and any new workstation beiing imaged gets the latest agent.

    Installation of the agent is automated within a script after the 2nd reboot.

    No need to rebuild the whole image and do all the testing and drinking to much coffee!

    my two cents!
  • in reply to MigrationDeletedUser
    Does the zac reg https:// -u -p not work to force a register after a build?
  • If you do it like that, please don't forget to delete the file "install2.cmd", as it contains the PASSWORD FOR DOMAIN ADMIN ACCOUNT in plain text!
  • Why wasn't the autoimport "register" feature put into ZCM? Is it something planned for a later date in ZCM?

Related
Recommended