1. ACPI Uniprocessor PC
2. Advanced Configuration and Power Interface (ACPI) PC
3. ACPI Multiprocessor PC
1. Which HAL I should build master image?
2. Do I need to use the UpdateUPHAL parameter in my sysprep.inf?
Are there any caveats i should be aware of?
Thankyou in advance,
Andrew
2. Yes, you need to udate sysprep.inf if the destination computer has
a different HAL.
When deploying to an ACPI Uniprocessor HAL:
UpdateUPHAL=ACPIAPIC_UP,%windir%\Inf\Hal.inf
When deploying to an ACPI Multiprocessor HAL:
UpdateHal=ACPIAPIC_MP,%windir%\inf\hal.inf
This can quite easily be done by using Windows PE as deployment
platform and then have a script updating this info after detecting
what hardware being used (after the image is layed down but before
rebooting into sysprep mini-setup).
Caveats
- Not supported one bit my Microsoft.
regards
Johan Arwidmark
Microsoft MVP - Setup/Deployment
> This can quite easily be done by using Windows PE as deployment
> platform and then have a script updating this info after detecting
> what hardware being used (after the image is layed down but before
> rebooting into sysprep mini-setup).
Do you have any points to using Windows PE in this matter?
Adam
In most cases you need to activate the disks using diskpart (assign a
driveletter) after laying down an image....
Here is a simple script that does hardware detect in Windows PE using
WMI and then updates sysprep.inf (the readini and writeini funtions
are "borrowed" from the BDD 2.5 zerotouchinstallation.vbs script)
' ********* Begin Script *****************
Option Explicit
' Declare the variables
Dim objWMI, objResults, objInstance, strModel, objFS
Dim strUP, strMP
' Initialize objects
Set objWMI = GetObject("winmgmts:")
set objFS = CreateObject("Scripting.FileSystemObject")
' Detect hardware using WMI
Set objResults = objWMI.InstancesOf("Win32_ComputerSystemProduct")
For each objInstance in objResults
If not IsNull(objInstance.Name) then
strModel = Trim(objInstance.Name)
End if
Next
' Find out sysprep values and update sysprep.inf
strUP = "ACPIAPIC_UP,%windir%\Inf\Hal.inf"
strMP = "ACPIAPIC_MP,%windir%\inf\hal.inf "
Select Case strModel
Case "SCENIC D"
WriteIni "c:\sysprep\sysprep.inf","Unattended","UpdateUPHAL",strUP
Case "ESPRIMO E"
WriteIni "c:\sysprep\sysprep.inf","Unattended","UpdateHal",strMP
Case "HP Compaq dc7600 Ultra-Slim Desktop"
WriteIni "c:\sysprep\sysprep.inf","Unattended","UpdateHal",strMP
Case Else
' Do nothing
End Select
Function ReadIni(file, section, item)
Dim line, equalpos, leftstring, ini
ReadIni = ""
file = Trim(file)
item = Trim(item)
Set ini = objFS.OpenTextFile( file, 1, False)
Do While ini.AtEndOfStream = False
line = ini.ReadLine
line = Trim(line)
If LCase(line) = "[" & LCase(section) & "]" Then
line = ini.ReadLine
line = Trim(line)
Do While Left( line, 1) <> "["
'If InStr( 1, line, item & "=", 1) = 1 Then
equalpos = InStr(1, line, "=", 1 )
If equalpos > 0 Then
leftstring = Left(line, equalpos - 1 )
leftstring = Trim(leftstring)
If LCase(leftstring) = LCase(item) Then
ReadIni = Mid( line, equalpos + 1 )
ReadIni = Trim(ReadIni)
Exit Do
End If
End If
If ini.AtEndOfStream Then Exit Do
line = ini.ReadLine
line = Trim(line)
Loop
Exit Do
End If
Loop
ini.Close
End Function
Sub WriteIni( file, section, item, myvalue )
Dim in_section, section_exists, item_exists, wrote
Dim itemtrimmed, read_ini, write_ini, temp_ini
Dim linetrimmed, line, equalpos, leftstring
in_section = False
section_exists = False
item_exists = ( ReadIni( file, section, item ) <> "" )
wrote = False
file = Trim(file)
itemtrimmed = Trim(item)
myvalue = Trim(myvalue)
temp_ini = objFS.GetParentFolderName(file) & "\" & objFS.GetTempName
Set read_ini = objFS.OpenTextFile( file, 1, True, False )
Set write_ini = objFS.CreateTextFile( temp_ini, False)
While read_ini.AtEndOfStream = False
line = read_ini.ReadLine
linetrimmed = Trim(line)
If wrote = False Then
If LCase(line) = "[" & LCase(section) & "]" Then
section_exists = True
in_section = True
ElseIf InStr( line, "[" ) = 1 Then
in_section = False
End If
End If
If in_section Then
If itemtrimmed = "" then
' Do nothing: we want to wipe the section
ElseIf item_exists = False Then
write_ini.WriteLine line
If myvalue <> "" then
write_ini.WriteLine item & "=" & myvalue
End if
wrote = True
in_section = False
Else
equalpos = InStr(1, line, "=", 1 )
If equalpos > 0 Then
leftstring = Left(line, equalpos - 1 )
leftstring = Trim(leftstring)
If LCase(leftstring) = LCase(item) Then
If myvalue <> "" then
write_ini.WriteLine itemtrimmed & "=" & myvalue
End if
wrote = True
in_section = False
End If
End If
If Not wrote Then
write_ini.WriteLine line
End If
End If
Else
write_ini.WriteLine line
End If
Wend
If section_exists = False and itemtrimmed <> "" Then
' section doesn't exist
write_ini.WriteLine
write_ini.WriteLine "[" & section & "]"
If myvalue <> "" then
write_ini.WriteLine itemtrimmed & "=" & myvalue
End if
End If
read_ini.Close
write_ini.Close
If objFS.FileExists(file) then
objFS.DeleteFile file, True
End if
objFS.CopyFile temp_ini, file, true
objFS.DeleteFile temp_ini, True
End Sub
' ********* End Script *****************
regards
Johan Arwidmark
Microsoft MVP - Setup/Deployment
On Fri, 13 Jan 2006 03:03:41 GMT, Adam Leinss <ale...@hotmail.com>
wrote:
> I always use WinPE as the deployment, whether I'm using ghost,
> altiris, ads or simply xcopy to lay down a sysprepped image.
>
> In most cases you need to activate the disks using diskpart (assign a
> driveletter) after laying down an image....
>
> Here is a simple script that does hardware detect in Windows PE using
> WMI and then updates sysprep.inf (the readini and writeini funtions
> are "borrowed" from the BDD 2.5 zerotouchinstallation.vbs script)
Sweet! I've never see anything quite like that. To use WinPE you to
have to be under an EA agreement, correct? I know we are using volume
licensing (for 700 PCs) and have 2 technet subscriptions, but I don't
know if that is good enough.
Thanks,
Adam
regards
Johan Arwidmark
Microsoft MVP - Setup/Deployment
On Sat, 14 Jan 2006 01:26:20 GMT, Adam Leinss <ale...@hotmail.com>
wrote:
>Johan Arwidmark <anon...@discussion.com> wrote in