I am using HII and have been using it for about 8 months now with no problems. This issue I am currently having isn't so much a problem, just an inconvenience.
Right now I run the script for the token replacement as a "run this script" option. Works great, no problems. However, it does become an inconvenience every time we get a new computer model in, as I have to update the script in each location. I would like to just run the script from a file, this way I only have to update the script in 1 location. We have several different jobs that run for different users so each time we get a new model in I have to update the jobs in multiple locations.
I've saved it as a .bat and as a .cmd to run it from DOS after the image is downloaded and before syspep runs. It works just like before, it copies the files and gets the correct drivers. The one thing happening though is that the computer is not automatically getting re-named like it would before. Instead %compname% is in the box and I have to manually enter the name. What am I missing that causes this to work fine when using the "run from script" command but doesn't name it when I point to a file?
Here is my script. Again, works just fine when run from script but when using the run from file option it does everything correct except it won't automatically re-name the computer.
REM token replacement on the inf file
REM the next line, ReplaceTokens, is a reserved keyword, the REM statement is so DOS will ignore the command
REM ReplaceTokens .\sysprep\sysprep.inf .\temp\%ID%.inf
Firm copy .\temp\%ID%.inf prod:sysprep\sysprep.inf
REM get rid of the old aclient.cfg file
firm delete prod:aclient.cfg
REM This section would normally be devoted to injecting model
specific drivers
echo Hardware Model number is %#!computer@model_num%
set model=%#*"SELECT REPLACE(model_num,' ','_') FROM computer WHERE computer_id=%ID%"%
if "%model%" =="D815EFVU" goto om815
if "%model%" =="D845GERG2" goto 845GE
if "%model%" =="0WF810" goto Opti745
if "%model%" =="0GX297" goto Opti745
if "%model%" =="0WK833" goto Opti745
if "%model%" =="0GM819" goto Opti755
if "%model%" =="0DR845" goto Opti755
if "%model%" =="0PU052" goto Opti755
if "%model%" =="00T606" goto Gx260
if "%model%" =="0N6016" goto Gx270
if "%model%" =="0U8633" goto Gx270
if "%model%" =="0H1489" goto Gx270
if "%model%" =="0U1324" goto Gx270
if "%model%" =="0CG566" goto Gx270
if "%model%" =="0U9268" goto Gx270
if "%model%" =="0H1105" goto Gx270
if "%model%" =="0T8262" goto Gx270
if "%model%" =="0UT806" goto Gx520
if "%model%" =="0PJ478" goto Gx520
if "%model%" =="0NF743" goto LatD520
if "%model%" =="0KX350" goto LatD620
if "%model%" =="0TD761" goto LatD620
if "%model%" =="0JK187" goto LatD620
if "%model%" =="0FT292" goto LatD620
if "%model%" =="0WM416" goto LatD630
if "%model%" =="0KU184" goto LatD630
if "%model%" =="01W890" goto LatD800
if "%model%" =="0JF242" goto LatD820
if "%model%" =="D865GLC" goto mpc865
if "%model%" =="D915GRV" goto mpc915
if "%model%" =="D945GCZ" goto mpc945
if "%model%" =="X3100" goto mpc3100
if "%model%" =="2656AFU" goto ibmr31
if "%model%" =="L19DX_Series" goto mpc424
if "%model%" =="0G5611" goto GX280
if "%model%" =="0C7195" goto GX280
if "%model%" =="0AA8h" goto hp7800
if "%model%" =="3031h" goto hp7800
if "%model%" =="30C0" goto hp6710b
if "%model%" =="30C5" goto hp8510p
if "%model%" =="30DD" goto hp6530b
if "%model%" =="0F4491" goto I4600
if "%model%" =="0T9369" goto I4600
if "%model%" =="0AA0h" goto hp4600
REM If we didn't find a match, just exit
goto Exit
m815
firm -recurse copy .\drivers\om815 prod:\drivers
firm -recurse copy \drivers\halaacpi.dll prod:windows\system32\hal.dll
goto Exit
:845GE
firm -recurse copy .\drivers\845GE prod:\drivers
goto Exit
pti745
firm -recurse copy .\drivers\Opti745 prod:\drivers
goto Exit
pti755
firm -recurse copy .\drivers\Opti755 prod:\drivers
goto Exit
:Gx260
firm -recurse copy .\drivers\Gx260 prod:\drivers
goto Exit
:Gx270
firm -recurse copy .\drivers\Gx270 prod:\drivers
goto Exit
:Gx520
firm -recurse copy .\drivers\Gx520 prod:\drivers
goto Exit
:LatD520
firm -recurse copy .\drivers\LatD520 prod:\drivers
goto Exit
:LatD620
firm -recurse copy .\drivers\LatD620 prod:\drivers
goto Exit
:LatD630
firm -recurse copy .\drivers\LatD630 prod:\drivers
goto Exit
:LatD800
firm -recurse copy .\drivers\LatD800 prod:\drivers
firm -recurse copy \drivers\halaacpi.dll prod:windows\system32\hal.dll
goto Exit
:LatD820
firm -recurse copy .\drivers\LatD820 prod:\drivers
goto Exit
:mpc865
firm -recurse copy .\drivers\mpc865 prod:\drivers
goto Exit
:mpc915
firm -recurse copy .\drivers\mpc915 prod:\drivers
goto Exit
:mpc945
firm -recurse copy .\drivers\mpc945 prod:\drivers
goto Exit
:mpc3100
firm -recurse copy .\drivers\mpc3100 prod:\drivers
goto Exit
:ibmr31
firm -recurse copy .\drivers\ibmr31 prod:\drivers
firm -recurse copy \drivers\halaacpi.dll prod:windows\system32\hal.dll
goto Exit
:GX280
firm -recurse copy .\drivers\GX280 prod:\drivers
goto Exit
:hp4600
firm -recurse copy .\drivers\hp4600 prod:\drivers
goto Exit
:hp7800
firm -recurse copy .\drivers\hp7800 prod:\drivers
goto Exit
:hp6530b
firm -recurse copy .\drivers\hp6530b prod:\drivers
goto Exit
:hp6710b
firm -recurse copy .\drivers\hp6710b prod:\drivers
goto Exit
:hp8510p
firm -recurse copy .\drivers\hp8510p prod:\drivers
goto Exit
:I4600
firm -recurse copy .\drivers\I4600 prod:\drivers
goto Exit
:mpc424
firm -recurse copy .\drivers\mpc424 prod:\drivers
goto Exit
:Exit
exit