cschneegans / unattend-generator

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

Disable 8.3 Naming #39

Open ChGen opened 3 weeks ago

ChGen commented 3 weeks ago

I see you that you included the tweak on disabling access times support on NTFS for performance reasons. I suggest you add another tweak, Disable 8.3 Naming, which could also improve NTFS performance with multiple small files (basically most of msys/cygwin/git/python stuff). See also this link for details and performance graph: https://learn.microsoft.com/ru-ru/archive/blogs/josebda/windows-server-2012-file-server-tip-disable-8-3-naming-and-strip-those-short-names-too

cschneegans commented 2 weeks ago

I am aware of the many problems with 8.3 names – the performance impact is not even the most serious, IMO.

Ideally, I would like to not only disable 8.3 name creation, but get rid of all 8.3 names, including the notorious PROGRA~1. It is very appealing to do this in the PE phase of Windows Setup, before Windows boots for the first time, but combining this with the autounattend.xml process is challenging.

In the meantime, consider using a custom script to call fsutil.exe 8dot3name set C: 1. This URL will configure the form accordingly.

inschrift-spruch-raum commented 1 week ago

I saw the following registration form on a Chinese forum image Try this one

cschneegans commented 1 day ago

Disabling 8.3 name creation is simple and does not even require editing the registry – just run fsutil.exe 8dot3name set 1 or fsutil.exe 8dot3name set C: 1. But this does not address the problem that at this point there are already about 80,000 8.3 file names on the C: drive.

cschneegans commented 1 day ago

In my opinion, by far the best opportunity to remove 8.3 names is before Windows has even started for the first time. This leaves two approaches:

image

Assuming the answer file is located on D:\, run this command to begin the installation:

setup.exe /NoReboot /Unattend:D:\notautounattend.xml

Unfortunately, I don't see a way to fully automate this – you still have to run those fsutil.exe commands before Windows starts for the first time.

inschrift-spruch-raum commented 1 hour ago

Disabling 8.3 name creation is simple and does not even require editing the registry – just run fsutil.exe 8dot3name set 1 or fsutil.exe 8dot3name set C: 1. But this does not address the problem that at this point there are already about 80,000 8.3 file names on the C: drive.

Perhaps this is another bug in my NTLite encapsulation, my ISO image cannot execute this command(Maybe now it's okay) The PowerShell script you passed is indeed very useful, it helped me delete all 8dot3 file names in the encapsulated version