Scripted Imaging

Use the following steps to automatically perform workstation imaging.

  1. From ConsoleOne on your ZENworks for Desktops Windows 2000 Server, browse to the .Images.IST.Corp.DA container.

  2. Right-click the .Images.IST.Corp.DA container > New > Object >Workstation Image > OK.


    Screen shot of the New Object dialog box opened from ConsoleOne. The Workstation Image object is selected.

  3. In the Name field of the New Workstation Image dialog box, type Scripted Windows 2000 Pro > select Define Additional Properties > click OK.


    Screen shot of the New Workstation Image dialog box. Scripted Windows 2000 Pro has been typed in the Name field.

  4. In the Properties of Scripted Windows 2000 Pro dialog box, select Use Scripted Imaging > enter the following lines of text into the image script field.

    The following lines delete all partitions:

    img pd1

    img pd2

    img pd3

    img pd4

    The following lines create a 2 gigabyte DOS partition (C:) and set it active:

    img pc1 FAT16 2040

    img pa1

    The following line creates a second partition (D:) to fill the drive and formats it to use the FAT32 file system:

    img pc2 FAT32

    The following line inserts the Windows 200 Pro base image data as an add-on into the C: partition:

    img rp 10.0.0.202 //da-02/d:/images/W2Kpro.zmg a1:p1

    The following line inserts the ConsoleOne image data into D: using file set 2, which excludes the ConsoleOne registry settings for use with the C: drive:

    img rp 10.0.0.202 //da-02/d:/images/ConsoleOne.zmg a1:p2 s2

    The following line inserts the C1pathD image file to C:, where the ZENworks Imaging Service client component can integrate the ConsoleOne registry settings to recognize ConsoleOne on drive D:

    img rp 10.0.0.202 //da-02/d:/images/C1pathD.zmg a1:p1

  5. Verify the script you have entered for accuracy > click OK.


    Screen shot of the Properties page of the Scripted Windows 2000 Pro Workstation Image object. The Image Files tab is selected.


Troubleshooting

Imaging scripts are intended to execute with a minimum of feedback at the target workstation. This makes it challenging to root out errors in your scripts. When creating imaging scripts, it can be extremely helpful to insert pauses between tasks by adding these lines:

echo Press Enter

read ans

Longer scripts may have issues executing because of a bug in the original proxy server code that fails to send the long script to the target workstation. The result is that the Imaging Engine prematurely finishes, without executing any commands and displaying a cheery "Operation Successful" message. (That message is a lie. Don't believe it.) At the time of this publication, Novell is releasing a fix in file ZD32NWB.EXE on the Novell Support Web site .

NTFS partitions are a different challenge. Microsoft has three versions, all supported by ZENworks. Because Microsoft frequently changes the NTFS version and sub-version code, Novell only pre-formats NTFS partitions. To make an NTFS partition that you create with the IMG command work properly, you would need to image a valid NTFS partition and insert it as an add-on image to a partition created by the ZENworks Imaging engine.


Example Script

The first line of the script pre-formats a 4 GB NTFS partition:

IMG PC2 NTFS 4096

The second line of the script injects NTFS information into NTFS partition:

IMG RP 10.0.0.202 //DA-02/D:/Images/NTFSimage.zmg a1:p2

Until the NTFS formatting information is put into a pre-formatted NTFS partition, the NTFS partition will not accept any other file system data.

For more information on using commands in image scripts, refer to the ZENworks for Desktops 3.2 online documentation.