MSFN Forum: The question Of answer file - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

The question Of answer file Computer Name Rate Topic: -----

#1 User is offline   berci 

  • Group: Members
  • Posts: 7
  • Joined: 04-November 06

Posted 14 November 2006 - 02:52 AM

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.


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy