무인 Windows7 설치에 사용할 응답 파일을 만들었습니다. 내가 몇 가지 설정을 즉시 수정할 수 (시간대, 컴퓨터 이름, 요법) 수 싶습니다,하지만 난 VBScript를/XML에 새로운 해요. 나는이 사이트에서 깔끔한 artical을 발견했다. xpath 사용 방법은 VBScript Find a node in XML node and replace the value이다. 내 문제 중 일부는 형식을 사용하는 예제를 찾지 못했기 때문에 노드를 대상으로합니다 (생각합니다). 전체 및 그냥,하지만 전체 응답 파일에서 동일한 구성 요소 이름 가진 여러 노드가 사용하여 시도했다. 제안 ... 제발? :)VBS를 사용하여 XML 검색 및 값 변경
<unattend xmlns="urn.schemas-microsoft.com:unattend">
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="*REMOVED*" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ProductKey>*REMOVED*</ProductKey>
<RegisteredOwner>*REMOVED*</RegisteredOwner>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<ComputerName>*</ComputerName>
<DoNotCleanTaskBar>true</DoNotCleanTaskBar>
<BluetoothTaskbarIconEnabled>false</BluetoothTaskbarIconEnabled>
<CopyProfile>true</CopyProfile>
<ShowWindowsLive>false</ShowWindowsLive>
<TimeZone>VarTime</TimeZone>
</component>
</settings>
</unattend>
VB에서 혼란 스러울 정도로 혼자 힘으로 올라올 수있었습니다. 나는 그 포스트에 감사한다. 이렇게하면 사용자 상자도 프롬프트됩니다. 이와 같은 일이 효과적이지 않고 효율적으로 일하는 이유가 있습니까?
Set xml = CreateObject("Msxml2.DOMDocument.3.0")
xml.Async = "False"
xml.load "path.xml"
strTime = InputBox("Please Select your Time Zone.")
strTimeZone = "Nothing"
if strTime= "1" then strTimeZone= "Eastern Standard Time"
if strTime= "2" then strTimeZone= "Central Standard Time"
if strTime= "3" then strTimeZone= "Mountian Standard Time"
if strTime= "4" then strTimeZone= "Pacific Stardard Time"
Set TimeZone = xml.selectSingleNode("//unattend/settings/component/TimeZone")
TimeZone.Text = strTimeZone
'Save the xml document with the new settings.
strResult = xml.save("path.xml")
의견에 감사드립니다. 나는 꽤 잘하는 것처럼 보였던 (위에 언급 한) 것을 생각해 냈습니다. 이제 Inputbox()에 문제가있어 올바른 값이 있는지 확인하십시오. 나는 그것을 이해할 수 없다면 또 다른 질문을 시작할 것이다. –