Novell Home

Naming the Workstation with Scripted Imaging

Novell Cool Solutions: Tip
By Martin Hartkopf

Digg This - Slashdot This

Posted: 7 Apr 2005

When you use Windows Unattended Installation, or SYSPREP, you always run into trouble with automatic naming of the workstation, especially when you also want the workstation to join the domain without any user interaction. Here's a solution that does it right after Image Restore.

First at all you need a ZENworks Image from the unattended installation from right after the first reboot. Then you rename the

into "$/Setup/win.txt"

and the

into "$win_nt$.~bt'/Win.txt".

In both config files you insert WSNAME for the Workstation Name Variable.

Looks like this:


And here is the script for the Scripted Imaging Engine:

ZISNAME='zisview Name'


if test ! $ZISNAME; then

     echo -e "No ZIS Information was found "
     echo -e "\n"
     while test ! $WSNAME; do
           echo -n "Please Enter Workstation Name ( FMSBXXXX ) : "
	   read WSNAME;

echo -e " Restore from ZEN Proxy"
img pd1

echo -e "Mounting the restored Partition for Variable xchange"
mkdir /fat
mount -t vfat /dev/hda2 /fat
sed 's/wsname/'$ZISNAME'/g' /fat/$/Setup/win.txt > /fat/$/Setup/unattend.txt
sed 's/wsname/'$ZISNAME'/g' /fat/'$win_nt$.~bt'/Win.txt > /fat/'$win_nt$.~bt'/Winnt.sif

if test $WSNAME; then
  	zisedit Name=$WSNAME;

echo - e "Clearing and setting some Variables"
zisedit workgroup=
zisedit SID=
zisedit WorkstationID=
zisedit DNSHostName=$WSNAME

If you have any questions you may contact Martin at

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© 2015 Novell