I need a vbscript to create a variable for OS installation
Hi there, hope you can help, here we have 20 remote locations around the world and each has an answer file depending on location. Up till now we used the unknown computer suppoirt for building our machines but I am trying to cretate a lite touch eventual zero touch build but have run into issues with choosing the correct OS answer file. Each location has the same windows 10.wim but different answer file depending on site. Does anyone know how to cerate a variable I can use for choosing the corerct location as the machines are still in WINPE and so have the minnit name and not the correct asset name. We use SCCM current branch. Thanks so much if anyone can help..
Community Chosen Answer
you can use powershell or a batch file to replace text in a flie. You would need one line for every line you want to replace.
powershell -Command "(gc C:\Windows\Panther\
unattended.xml) -replace 'this text', 'that text' | Out-File
in a batch file
@echo off setlocal enableextensions disabledelayedexpansion
for /f "delims=" %%i in ('type "
unattended.xml" ^& break ^> "%
unattended.xml%" ') do ( set "line=%%i" setlocal enabledelayedexpansion >>"
unattended.xml" echo(!line:%search%=%replace%! endlocal