1

Is it possible to programmatically get the "autounattend.xml" copied to the windows insallation during windows autounattended setup?

My use case

I have a USB-Stick with different unattended files for different configurations/scenarios:

  • autounattend-a.xml for scenario "a"
  • autounattend-b.xml for scenario "b"
  • autounattend-c.xml for scenario "c"

which I copy/rename to autounattend.xml for the installation in a specific scenario:

e.g. copy autounattend-a.xml autounattend.xml for an installtion in scenario "a"

Once installed (maybe days later) I'd like to know which autounattend.xml configuration/file I used to install windows. Since the autounattend.xml in the USB-Stick might have been replaced for another installation I'd like to have a copy of it in the installed system.

My workaround at this moment is to copy the autounattend.xml to sources\$OEM$\$1.

wolfrevo
  • 317

1 Answers1

2

You might have luck finding what you need in the unattend.xml on the freshly installed machine. Try:

  • C:\Windows\Panther\unattend.xml
  • %WinDir%\Panther\unattend.xml

Or you could add a RunSynchronousCommand to your autounattend.xml file that would copy the autoattend.xml file itself to a less removable drive on the machine. Similar to the answer shown here: PowerShell script do not run from autounattend.xml file