According to MSDN, if we set policy for creation of file objects on format 8.3 here:
HKLM\System\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation
to value 3, I'm quote:
3: Disables 8dot3 name creation for all volumes except the system volume.
But, in real, if we will do so and restart OS, then write:
Code: Select all
echo.> "long long name"
dir /x long*
Output is only long name.
It also proves the answer of fsutil.exe:
So, 8dot3 policy works not as described in MSDN.
When I searched an answer, I reversed fsutil.exe.
I saw it check registry key:
HKLM\System\CurrentControlSet\Policies -> NtfsDisable8dot3NameCreation
(most priority)
If there is no key, the next it check:
HKLM\System\CurrentControlSet\Control\Filesystem -> NtfsDisable8dot3NameCreation
And if on these values data set to = 2, it also check special mark on service region of volume
using function DeviceIoControl (with flag FSCTL_QUERY_PERSISTENT_VOLUME_STATE).
Next, it read location of system folder throught the function GetWindowsDirectoryW.
Likely, it done for defining the letter of system drive.
I did not investigate further the logic.
Anyway, this policy works not according to MSDN manual. But why and where error ?