Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

windows 7 and HII

Updated: 10 Aug 2010 | 4 comments
camaroguy's picture
0 0 Votes
Login to vote

So I am trying to build a script to use ghost and HII script but I am not having much luck can someone help me out. In my sysprep.xml file I enter the following:

<ComputerName>%COMPNAME%</ComputerName>

 

To set the computer name as a variable or Token.

 

Then in the DS script I have the following:

 

REM Deploy Win7 Image
F:\ghost\ghost32 -clone,mode=restore,src=F:\win7_sys.gho,dst=1 -sure

Run Script
REM REPLACE TOKENS
REM REPLACETOKENS .\scripts\sysprep.xml .\TEMP\%ID%.XML

REM Sysprep Image Version
mkdir C:\windows\Gentiva\logs
date /T > D:\windows\logs\BUILD.txt
time /T >> D:\windows\logs\BUILD.txt
REM Copy the sysprep answer file

copy ".\Temp\%ID%.xml" "D:\windows\system32\sysprep\sysprep.xml" /Y
copy ".\Temp\%ID%.xml" "D:\windows\system32\sysprep\panther\sysprep.xml" /Y

pause

REM BCEDIT to change boot config..
BCDEDIT /set {bootmgr} device partition=c:
BCDEDIT /set {default} device partition=d:
BCDEDIT /set {default} osdevice partition=d:

pause
exit 0

I have checked sysprep.xml file on the drive after being imaged and the computer name is now in place of the token but when the machine reboot and start for the first time it says there is a error.  

 

If I leave computer name blank in my XML it run through no issues but prompts me to enter a computer name.  
 

Comments

MurdoN01's picture
28
Jan
2010
0 Votes 0
Login to vote

Try This

copy ".\Temp\%ID%.xml" "D:\windows\panther\sysprep.xml" /Y

The Panther directory is were all the "magic" happens now and also if it fails durring sysprep look in C:\Windows\Panther\UnattendGC for setup.logs. This will let you know what is happing or not.

Hope this helps!

spazzzen's picture
02
Feb
2010
0 Votes 0
Login to vote

File name

I do believe the file name needs to be unattend.xml or Autounattend.xml instead of sysprep.xml.  That is atleast the name i am using and it works fine (I use unattend.xml).  I believe they changed this in Windows 7 (maybe in vista).  Also MurdoN01 half correct, for the location the file.  The actually location where I put my unattend.xml file is in the Windows\panther\unattend\ dir.  I also use the following command to get it in the correct location: ".\RDeploy\Windows\firm copy .\temp\%ID%.xml prod:\Windows\panther\unattend\unattend.xml".  This is the command used in WinPE.

JeffreyJRiggs's picture
05
Feb
2010
0 Votes 0
Login to vote

spazzzen,              Are

spazzzen,
             Are you using an unattended install or a sysprep image?

I too am now testing this stuff out..

I have the image being dropped and works.. i do not have it joining the domain or applying computer name...yet... but doing that now..

all works....

now...
for xp... you can firm the replacetoken modified inf to the sysprep.inf into the sysprep folder and viola.... it will get the new computer name...

now for win7
I cant even get the replacetokens to work.... but i am using F: and not the actual .\scripts.. so going to make some modifications and check....

spazzzen's picture
09
Feb
2010
1 Vote +1
Login to vote

both...

To create the HII i use a unattended install.  For the unattended install I use the autounattend.xml on a usb drive.  I make the image then sysprep it and pull it up to the server using ImageX (the microsoft recommended imaging tool for Windows7).  When I push the image and unattend.xml file down I do the token replacement as I have the computer name set to %NAME%.  Here is my code for WinPE:
REM ReplaceTokens .\Sysprep\unattend.xml .\temp\%ID%.xml
.\RDeploy\Windows\firm copy .\temp\%ID%.xml prod:\Windows\panther\unattend\unattend.xml