Here is a snippet of what we use at my work.
echo %#!computer@prod_name% >> .\Models\%ID%.txt
for /f "tokens=1-5" %%A in (.\Models\%ID%.txt) do (Set Model=%%C)
If %Model% == dc7100 goto dc7100
If %Model% == nc2400(#ABA) goto nc2400
If %Model% == nc6400 goto nc6400
If %Model% == dc7600 goto dc7600
If %Model% == nc6220 goto nc6220
If %Model% == dc7700p goto dc7700p
If %Model% == nc6220 goto nc6220
If %Model% == dc7700 goto dc7700
Hope that helps.
Quote:
Originally Posted by Durrok
Alright I have been struggling like crazy to get tokens to work correctly for my hardware independent image.  I have the feeling I am simply missing something very easy here.
Running DS 6.8, booting into a windows pe pre-boot environment. I am trying to use this script (I condensed it):
echo Hardware Model number is %#!computer@model_num%
if "%#!computer@model_num%" =="0G5611" goto GX280
REM If we didn't find a match, just exit
goto Exit
:GX280
firm -recurse copy .\drivers\GX280 prod:\drivers
goto Exit
:Exit
exit
It is not working however. echo Hardware Model number is %#!computer@model_num% returns %#!computer@model_num%. I have already spent a few days pouring over this site, google, and any documentation from altiris I can find but in everyone's examples %#!computer@model_num% just works. What am I doing wrong?
|