Script for autounattend.xml (ComputerName)

brendanK

New Member
Messages
8
Reaction score
1
Hey,
is it possible to change the autounattend.xml during the Setup? we want to define the Computername with a script and to run the script during the windows setup, so that our background is build afterwards in a PreLogin Script having all Ready the right Computername. for that we need to load a csv file with all our information from a network folder. since we are using a PXE for it, the network connection shouldn´t be a Problem right?

Edit 1
After i read a post from nuhi, i saw that it is not only the autounattened file, that is responsable for the computers name.

but maybe there is a other solution the configure it in the setup.

Thanks in advanced.
 
Last edited:
It's not possible afaik.
Have been involved in rolling out Windows 7 installations for a closed company group via PXE formatted installation on Laptops, where the user/employee was given a username and a default PW, which had to be changed at the first login.
Please note that I was not an IT employee, but was instructed by IT on how the PXE installation should take place for about 240 employees.
Whether it's changed for W10/11 I doubt though, as it would require the script to predict which PC/Laptop which employee will get in hand!
Thanks.
 
My suggestion is to follow the normal practice of running a rename script during specialize pass, because your new hostname doesn't take effect until after a restart. A planned restart is allowed if you tag the RunSynchronous command.

Add something like this to your autounattend.xml:
Code:
<settings pass="specialize">
        <component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <RunSynchronous>
                <RunSynchronousCommand wcm:action="add">
                    <Description>Script to rename computer</Description>
                    <Order>1</Order>
                    <Path>\\Server\Share\rename_script.bat</Path>
                    <WillReboot>Always</WillReboot>
                </RunSynchronousCommand>
            </RunSynchronous>
        </component>
</settings>

The solution to this type of question is the same as the case where you didn't use NTLite.
 
Back
Top