I use the setupmgr.exe to create a answer file, it's name is input.txt.
but , I modify the "ComputerName=test" to "ComputerName=XXXNAMEXXX". then I use the HTA script to modify the "XXXNAMEXXX" to the name that I need.
the script is :
----------------------------------------------------------------------------------
Const ForReading = 1
Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Scripts\Text.txt", ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, "Jim ", "James ")
Set objFile = objFSO.OpenTextFile("C:\Scripts\Text.txt", ForWriting)
objFile.WriteLine strNewText
objFile.Close
----------------------------------------------------------------------------------
then I use the Winnt32.exe to install the Windows XP and with the /unattend:c:\temp\input.txt
At last, I found that the PC's name is not the name that I wrote to the input.txt, the windows create a new name by itself.
I don't know why.
Page 1 of 1
The question Of answer file Computer Name
Share this topic:
Page 1 of 1



Help
Back to top








