none
How to automatically assign ComputerName during unattended Vista install based on GUID, if it is set in the netbootGUID field on AD?

    Question

  • Hello,

    I am doing an unattended install of Vista SP1 via a DVD using an answer file tailored to my needs.

    I prestaged a client computer by creating a Computer object on AD/Windows Server 2008 and also set the pertinent netbootGUID. I prescribed %MACHINENAME% in the answer file for ComputerName. UnsecureJoin is set to false and have enabled Microsoft-Windows-UnattendedJoin > JoinDomain with appropriate credentials.

    But when I run setup off of the DVD, setup generates the following error and quits:
    "windows could not parse or process the unattend answer file for pass [specialize]. The settings specified in the answer file cannnot be applied. The error was detected while processing settings for component [Micrsoft-Windows-Shell-Setup]

    If I specify * for ComputerName, a random machine name is assigned and the computer is added to the appropriate OU.

    What is needed for setup to retrieve the right name off of AD?
    • Moved by Tim QuanModerator Monday, June 29, 2009 3:34 AM (From:Windows Vista Deployment and Imaging)
    Thursday, June 25, 2009 7:22 PM

All replies

  • May be this script can help you

    Option Explicit
    Dim computerName, OU, unattendFile, WshShell, result, fso, unattendFileObject, strContents
    '----------------------------------------------------------------------
    unattendFile = "E:\unattend.xml"

    ' end user defined settings
    '----------------------------------------------------------------------
    Set WshShell = WScript.CreateObject("WScript.Shell")

    dim answer
    do while answer <> vbYes
         computerName = InputBox("Enter the desired computer name", "Computer Name")
         OU = InputBox("Enter the distinguished name of the desired OU", "Organization Unit")
         answer = MsgBox("Is this correct?" & vbCrLf & vbCrLF & "Name: " & computerName & vbCrLF & "OU: " & OU, vbYesNo, "Computer Account Details")
    loop

    'WshShell.Run "%SYSTEMDRIVE%\sources\setup.exe /wds /noreboot", 0, true

    Set fso = CreateObject("Scripting.FileSystemObject")

    if fso.FileExists(unattendFile) = false then
         wscript.echo "Couldn't find unattend file"
    else
              'Read the unattend file in and replace apprpriate variables
        Set unattendFileObject = fso.OpenTextFile(unattendFile, 1)
        strContents = unattendFileObject.ReadAll

              strContents = Replace(strContents, "%OU%", OU)
              strContents = Replace(strContents, "%COMPUTERNAME%", computerName)
        unattendFileObject.Close

         'Write the updated contents back to the unattend file
         Set unattendFileObject = fso.OpenTextFile(unattendFile, 2)
         unattendFileObject.Write(strContents)
         unattendFileObject.Close

    End If


    Regards, Ankur Mishra Sr. Engineer – Systems, Datacenter & Client Deployment Engineering
    Friday, June 26, 2009 1:03 PM
  • Sorry, I didn't post it in the first place. Here it is: http://pastebin.com/d486e1038

    P.S.: This forum prevented posting the answer file in its entirety owing to the number of charaters.
    • Edited by TRIO IT Support Friday, June 26, 2009 6:53 PM Created hyperlink for the URL
    Friday, June 26, 2009 6:51 PM
  • This link may help:
    http://social.technet.microsoft.com/Forums/en-US/itprovistadeployment/thread/70e18fc0-8933-46c3-8861-39429ff05bf1

    Going by the links posted in the aforementioned thread, I am at a dead end to achieve my objective via an unattended DVD install.
    Friday, June 26, 2009 10:13 PM