cschneegans / unattend-generator

.NET Core library to create highly customized autounattend.xml files
https://schneegans.de/windows/unattend-generator/
MIT License
419 stars 37 forks source link

Word limit? #15

Closed yanzhou-ca closed 3 months ago

yanzhou-ca commented 3 months ago

I was trying to add some registry tweaks under: "Scripts to run in the system context, before user accounts are created" section, and after the content reaches to 15593 characters (with spaces), 426 lines, I can't put more into it. Just want to check if there is a word limit there?

cschneegans commented 3 months ago

Every single textarea in the Run custom scripts section has a maxlength="16384" character limit, and the entire query string is currently limited to 64 KiB. This should be sufficient for the vast majority of use cases.

• If you want to enter a script longer than 16384 characters, you can split it in several parts, as long as every part can be processed independently.

• You can also remove the maxlength="16384" attribute in your browser's Developer tools (e.g. F12 in Google Chrome).

In both cases, the 64 KiB limit remains.

yanzhou-ca commented 3 months ago

What I did was manually add more registry entries into the xml file. The generated xml file has 29274 characters in line 4. Not sure if you could get rid of it?

Thank you so much for all your work!

cschneegans commented 3 months ago

I think I found a viable solution: <textarea maxlength="…"> is gone, but form submission will be aborted and a JavaScript alert will appear when the query string would be larger than 64 KiB: “Your form submission exceeds the limits of this server. You need to shorten some of your inputs.”

You may need to reload (F5) the page.