Is this the correct way for Post-Setup (Before logon)?

Unfortunately, there's no way to import a partial XML block from an unattended file into Post-Setup (from either Before logon or After logon).

You can add these Commands to (Before logon):

CommandArguments
cmd/c pushd && rd /s /q C:\Users\defaultuser0
netshadvfirewall set allprofiles state off
powercfg/h /type reduced
bcdedit/timeout 3
schtasks/Change /DISABLE /TN "Microsoft\Windows\Windows Error Reporting QueueReporting"
regadd "HKLM\SYSTEM\CurrentControlSet\Services\NlaSve\Parameters\Internet" /v EnableActiveProbing /t REG_DWORD /d 1 /f
regadd "HKLM\Software\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator" /v NoActiveProbe /t REG DWORD /d /f
regadd "HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce" /f /v CLEANUP /d "C:\Windows\Setup\Scripts\CLEAN.cmd"
 
So you mean every time I need to add them manually?
Is there a faster way, like exporting these commands or adding them all at once?
 
No. Your XML file isn't even a complete autounattend.xml for NTLite to try reading.

NTLite doesn't use RunSynchronous commands for most of its Post-Setup tasks, it moves them into a SetupComplete.cmd file. Since NTLite needs to track the added items, there is no import feature from another XML format.
 
Is there a reason not to add these via the UI to the Post-setup page - Before logon section?
You can then choose for the tool to use the Unattended mode in the toolbar, if the Unattended page is enabled.

If you prefer XML editing, then once preset is saved, you can edit it and see how the commands are formatted.
Reloading edited preset would reflect those changes in the UI.
 
I believe the OP is importing their partial answer file from another tool, and doesn't want to repeat the process.
 
Another solution is copying all those commands to a single CMD script, and run it from Post-Setup. There is no real advantage having them all split up as individual Post-Setup commands.
 
Back
Top