11-27-2023, 09:09 AM
For anyone interrested, I got working around that issue by putting the following inside the "settings pass="windowsPE"" section in autounattend.xml:
The drawback of that method is, you cannot modify autounattend.xml via that bat since it has already been called.
Code:
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>cmd.exe /c X:\PreInstall.bat</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
The drawback of that method is, you cannot modify autounattend.xml via that bat since it has already been called.