Deployment Solution

 View Only

Hardware Detection Without Using HII 

Oct 28, 2008 06:15 PM

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

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

Dec 15, 2008 07:01 AM

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?

Nov 18, 2008 03:36 PM

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

Nov 04, 2008 08:28 AM

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

Oct 29, 2008 08:46 AM

Link to smbiosd:
http://www.sudleyplace.com/download.htm

Related Entries and Links

No Related Resource entered.