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.

Hardware Detection Without Using HII

Updated: 28 Oct 2008 | 4 comments
erikw's picture
+4 4 Votes
Login to vote

Before HII was implemented in Altiris Deployment solution, we used various tricks to roll out an image to various machines. The Deployment Server script started a file called HWdetect, and that checked for the hardware and started the correct HAL and drivers.

With the sysprep.inf file in one of my previous articles this HWdetect script did the job.

  1. Copy the script below to Notepad.
  2. Alter it at will, and rename it to HWdetect.cmd
  3. Insert it in your deployment console, and used it with sysprep.inf.
Rem HWDetect for Deployment of Images
Rem This batchfile is called from the 'Instal computer...' events
Rem It Determines what type of hardware it's dealing with, so it can
Rem select the right image file and adjust the sysprep.inf for the right HAL.
Rem %1 is coming from Run Script and is %ID%

set Sysprep=Sysprep.inf
Set Configs=f:\Deploy\Sysprep
Set Tools=f:\Deploy\Sysprep
Set BiosFile=SMBIOSD.TXT

F:\Deploy\Tools\smbiosd /t=1 > a:\net\smbios.txt
rem Check for client Station model -> HP d530 CMT
F:\Deploy\Tools\find /i "HP d530 CMT" a:\net\smbios.txt
if errorlevel 1 goto Cont
	Copy F:\Deploy\Sysprep\Sysprep.inf F:\Deploy\Sysprep\%1.inf
	f:\Deploy\Tools\CHANGE f:\Deploy\Sysprep\%1.inf /FROM UpdateUPHAL= /TO UpdateUPHAL=\034ACPIAPIC_UP,\037WINDIR\037\Inf\Hal.inf\034
	f:\Deploy\Tools\CHANGE f:\temp\%1.dt /FROM \060OU\062 /TO SBCXP\047Werkplekken\047ClientStation
set image=basis.img
set type=DESKTOP
set model=D530CMT
goto end

:Cont
rem Check for Functional Workstation -> HP d530 USDT
F:\Deploy\Tools\find /i "HP d530 USDT" a:\net\smbios.txt
if errorlevel 1 goto cont2
	Copy F:\Deploy\Sysprep\Sysprep.inf F:\Deploy\Sysprep\%1.inf
	f:\Deploy\Tools\CHANGE f:\Deploy\Sysprep\%1.inf /FROM UpdateUPHAL= /TO UpdateUPHAL=\034ACPIAPIC_UP,\037WINDIR\037\Inf\Hal.inf\034
	f:\Deploy\Tools\CHANGE f:\temp\%1.dt /FROM \060OU\062 /TO SBCXP\047Werkplekken\047Functie
set image=basis.img
set type=DESKTOP
Set Model=D530USDT
goto end

:Cont2
rem Check for Functional Workstation -> HP Compaq dc7100 SFF
F:\Deploy\Tools\find /i "dc7100" a:\net\smbios.txt
if errorlevel 1 goto Cont3
	Copy F:\Deploy\Sysprep\Sysprep.inf F:\Deploy\Sysprep\%1.inf
	f:\Deploy\Tools\CHANGE f:\Deploy\Sysprep\%1.inf /FROM UpdateUPHAL= /TO UpdateUPHAL=\034ACPIAPIC_UP,\037WINDIR\037\Inf\Hal.inf\034
	f:\Deploy\Tools\CHANGE f:\temp\%1.dt /FROM \060OU\062 /TO SBCXP\047Werkplekken\047Functie
set image=basis.img
set type=DESKTOP
set Model=DC7100
goto end

:Cont3
rem Check for Functional Workstation -> HP Compaq dc7600 SFF
F:\Deploy\Tools\find /i "dc7600" a:\net\smbios.txt
if errorlevel 1 goto Cont4
	Copy F:\Deploy\Sysprep\Sysprep.inf F:\Deploy\Sysprep\%1.inf
	f:\Deploy\Tools\CHANGE f:\Deploy\Sysprep\%1.inf /FROM UpdateUPHAL= /TO UpdateUPHAL=\034ACPIAPIC_UP,\037WINDIR\037\Inf\Hal.inf\034
	f:\Deploy\Tools\CHANGE f:\temp\%1.dt /FROM \060OU\062 /TO SBCXP\047Werkplekken\047Functie
set image=basis.img
set type=DESKTOP
set Model=DC7600
goto end

:Cont4
rem Check for Laptop model ->hp Compaq nc6000
f:\Deploy\Tools\find /i "nc6000" a:\net\smbios.txt
if errorlevel 1 goto Cont5
	Copy F:\Deploy\Sysprep\Sysprep.inf F:\Deploy\Sysprep\%1.inf
	f:\Deploy\Tools\CHANGE f:\Deploy\Sysprep\%1.inf /FROM UpdateUPHAL= /TO ;UpdateUPHAL=
	f:\Deploy\Tools\CHANGE f:\temp\%1.lt /FROM \060OU\062 /TO SBCXP\047Werkplekken\047Mobiel
set image=basis.img
set type=LAPTOP
set model=NC6000


:Cont5
rem Check for Laptop model ->hp Compaq nc6120
f:\Deploy\Tools\find /i "nc6120" a:\net\smbios.txt
if errorlevel 1 goto end
	Copy F:\Deploy\Sysprep\Sysprep.inf F:\Deploy\Sysprep\%1.inf
	f:\Deploy\Tools\CHANGE f:\Deploy\Sysprep\%1.inf /FROM UpdateUPHAL= /TO ;UpdateUPHAL=
	f:\Deploy\Tools\CHANGE f:\temp\%1.lt /FROM \060OU\062 /TO SBCXP\047Werkplekken\047Mobiel
set image=basis.img
set type=LAPTOP
set model=NC6120
goto end

:End
:: CALL F:\Deploy\Tools\SetBIOS.Bat

Note: The script is intended for Compaq clients and was built late 2006. It still can be used, but is intended for the general idea.

Use it to your advantage.

Regards
Erik Westhovens

Comments

jahnemar's picture
29
Oct
2008
0 Votes 0
Login to vote
wuzfuzzy's picture
04
Nov
2008
0 Votes 0
Login to vote

Change??

What is this Change command? What is doing? Is this a different way of doing a ReplaceTokens?

You could also use the built in variables in DS to get the same info without using smbiosd IE %#!computer@prod_name%

Sample script:

if %ALTIRIS_PREBOOT_ID% == WINPE2_X86 set findpath=v:\

if %ALTIRIS_PREBOOT_ID% == WINPE2_X64 set findpath=V:\findx64

Echo "%#!computer@prod_name%" |%findpath%\FindStr "GX270"
If %ERRORLEVEL% EQU 0 set MODEL=GX270

Echo "%#!computer@prod_name%" |%findpath%\FindStr "IX325"
If %ERRORLEVEL% EQU 0 set MODEL=IX325

Lee Wilburn
Suzlon Wind Energy
If your question has been resolved, please click "Mark as Solution"! Thank you. Hope it helps!

erikw's picture
18
Nov
2008
2 Votes +2
Login to vote

Thanxs for your comments

Thanxss for your comments.
I have a trunkload of scripts doing tasks, that enable me to do various tasks automated.
the script is posted as a general idea.
There are not many people who are able to script out things, and i would like to see that much more people get a understadning of DS scripting.
it enahnces the DS experience much more.
Change is indeed a method that is used to replace tokens.

Regards
Erik
www.DinamiQs.com

Regards Erik www.DinamiQs.com Dinamiqs is the home of VirtualStorm (www.virtualstorm.org)

*************************************************************
If your issue has been solved, Please mark it as solved
***********

wuzfuzzy's picture
15
Dec
2008
0 Votes 0
Login to vote

Change

Where can I find this Change command it doesn't seem to be and exe named change with DS 6.9? Does this command technically run on the client so you acutally programiclly change tokens without it happening on the server like replacetokens works?

Lee Wilburn
Suzlon Wind Energy
If your question has been resolved, please click "Mark as Solution"! Thank you. Hope it helps!