If I modified your script like this do you think it would work?
Option Explicit
Dim answer, computerName, unattendFile, WshShell, fso, unattendFileObject, strContents, strComputer, objWMIService, colSMBIOS, objSMBIOS
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery _
("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
unattendFile = "C:\windows\Panther\unattend.xml"
Set WshShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(unattendFile) = False Then
wscript.echo "ERROR: Could not find the unattend file"
Else
'Read the unattend file in and replace apprpriate variables
Set unattendFileObject = fso.OpenTextFile(unattendFile, 1)
strContents = unattendFileObject.ReadAll
strContents = Replace(strContents, "_COMPUTERNAME_REPLACE_", objSMBIOS.SerialNumber)
unattendFileObject.Close
'Write the updated contents back to the unattend file
Set unattendFileObject = fso.OpenTextFile(unattendFile, 2)
unattendFileObject.Write(strContents)
unattendFileObject.Close
End If
Next