Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(automation): Add script to automatically populate <File> nodes in autounattend.xml #170

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

flobsx
Copy link

@flobsx flobsx commented Nov 6, 2024

Feat(automation): Add script to automatically populate nodes in autounattend.xml

  • It use a template autounattend_template.xml without any nodes
  • The files to add in xml are stored in subdirectory files
  • A mapping file is used to list files to add and set the destination in Path attribute.
  • Running insert_files_to_xml.ps1 will create autounattend.xml file based on autounattend_template.xml and populate nodes based on the mapping file. (This step could be automated in a CI in a future contribution)

The resulting xml should be similare to the one available before this change.


Hi,
thank you for your work!
As I'm a little bit lazy and want to play with it, I made a script to help me populate the xml file woth script contents.

I'm sharing it as it may be useful or improved by the community.
I'm not a Powerhsell expert and I didn't took time to buid a CI testing job so please be carefull while using it.
I tested it successfully on a new Windows 11 23H2 installation.

Some content in the xml where rewrited by the powershell script (Some inline > became >) but it seems to still work as expected. Please confirm it while reviewing this PR.

flobsx and others added 2 commits November 6, 2024 21:45
…n autounattend.xml

- It use a template autounattend_template.xml without any <File> nodes
- The files to add in xml are stored in subdirectory `files`
- A mapping file is used to list files to add and set the destination in Path attribute.
@memstechtips
Copy link
Owner

Thanks for sharing this.
I don't want to add this to the project at the moment, but I will leave this PR up for the future because it might be quite useful.

@flobsx
Copy link
Author

flobsx commented Nov 10, 2024

Of course, no problem. 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants