8dot3 name creation issue

Discussion in 'Sandboxie (SBIE Open Source) Plus & Classic' started by Mr.X, Oct 28, 2022.

  1. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,257
    Location:
    .
    My computer stayed on this status since yesterday
    Code:
    C:\Windows\system32>fsutil 8dot3name query R:
    The volume state is: 1 (8dot3 name creation is disabled).
    The registry state is: 0 (Enable 8dot3 name creation on all volumes).
    
    Based on the above settings, 8dot3 name creation is enabled on R:
    
    Installed Sandboxie Plus 1.5.2 and now getting this msg:
    Then I did query again
    Code:
    C:\Windows\system32>fsutil 8dot3name query R:
    The volume state is: 1 (8dot3 name creation is disabled).
    The registry state is: 0 (Enable 8dot3 name creation on all volumes).
    
    Based on the above settings, 8dot3 name creation is enabled on R:
    
    Then I tried enabling it directly to R: but
    Code:
    C:\Windows\system32>fsutil behavior set disable8dot3 R: 0
    Error:  Short name settings may not be changed on this volume due to the global registry setting.
    
    Then I switched back to 8dot3 name creation on a per volume basis
    Code:
    C:\Windows\system32>fsutil behavior set disable8dot3 2
    The registry state is now: 2 (Per volume setting - the default).
    
    Next I enabled 8.3 name on R: drive and query its status
    Code:
    C:\Windows\system32>fsutil behavior set disable8dot3 R: 0
    Successfully enabled 8dot3name generation on R:
    
    C:\Windows\system32>fsutil 8dot3name query R:
    The volume state is: 0 (8dot3 name creation is enabled).
    The registry state is: 2 (Per volume setting - the default).
    
    Based on the above settings, 8dot3 name creation is enabled on R:
    
    Finally, msg is gone!!! Finally!

    Unfortunately after a computer restart it's status was reverted again to disabled...

    I know. I know this is not a SBIE issue anymore but I'm posting my issue so maybe someone is facing the same.
     
  2. APMichael

    APMichael Registered Member

    Joined:
    Jun 17, 2020
    Posts:
    128
    Location:
    Germany
    Unfortunately I didn't have time to test it, maybe Windows has a problem here to apply the 8.3 name support automatically to a subsequently created virtual drive.

    I always have my RAM disk created at Windows startup using task scheduling and a batch file. It seems to work reliably with that. The batch file looks like this:
    Code:
    imdisk -a -s 1G -m R: -p "/fs:ntfs /q /y"
    LABEL R:RAMDisk
    fsutil behavior set disable8dot3 R: 0
    
     
  3. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,257
    Location:
    .
    I'm using program's defaults, except 'Allocate Memory Dynamically' which is not a default setting.
     
  4. APMichael

    APMichael Registered Member

    Joined:
    Jun 17, 2020
    Posts:
    128
    Location:
    Germany
    Ok, then you use "ImDisk Toolkit". For "Allocate Memory Dynamically" you have to use the "RamDyn.exe". Unfortunately, I have never used this before and can't help at the moment. I am sorry.
     
  5. busy

    busy Registered Member

    Joined:
    Apr 10, 2006
    Posts:
    507
    You can create a task, with run with highest privileges , for fsutil part.

    Task Scheduler > Right click> Create New Task > Actions > New... > Action: Start program

    Program/script:
    Code:
    "C:\Windows\System32\fsutil.exe"
    Add arguments:
    Code:
    8dot3name set R: 0
     
  6. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,257
    Location:
    .
    @APMichael @busy

    Thanks a lot for your suggestions, going to try them both later in the rest of the day.

    But questions arise:
    why does M$ handle this matter like that?
    is it a bug or design on purpose?
    who knows...
     
  7. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,257
    Location:
    .
    Is this really a common scenario?

    After seeing this 8.3 naming issue happening to me and thinking about the solutions provided above, I don't want to mess more with my os.
     
  8. DavidXanatos

    DavidXanatos Developer

    Joined:
    Sep 6, 2006
    Posts:
    2,524
    Location:
    Viena
    @Mr.X
    so "fsutil behavior set disable8dot3 0" is not surviving a reboot on your system?
     
  9. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,257
    Location:
    .
    Correct, it doesn't survive it.

    But
     
  10. DavidXanatos

    DavidXanatos Developer

    Joined:
    Sep 6, 2006
    Posts:
    2,524
    Location:
    Viena
    this is stange i tested that scenario and after a reboot the ram disk still was set to support 8.3 naming, could you please re test this case

    the global windows setting should be persistent as its stored in the registry
     
  11. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,257
    Location:
    .
    I have re-tested it three or four times. But I don't care in the end, I don't think I'll encounter a scenario where I need to run an very old installer anyways.
     
  12. DavidXanatos

    DavidXanatos Developer

    Joined:
    Sep 6, 2006
    Posts:
    2,524
    Location:
    Viena
    well my point is that if this issue can not be simply once and for all resolved, it may be better not to show this message, or alternatively add code to silently auto enable 8.3 naming for volumes boxes are seen on.
     
  13. soccerfan

    soccerfan Registered Member

    Joined:
    Oct 15, 2007
    Posts:
    585
    Fair enough.

    Please, please do not go this route just to satisfy a few "fringe" cases.
     
  14. busy

    busy Registered Member

    Joined:
    Apr 10, 2006
    Posts:
    507
    From the ImDisk RamDisk Configuration GUI > Advanced > Additional Parameters

    If 'Allocate Memory Dynamically' is enabled.
    Code:
    -p \"/FS:NTFS /Q /Y /S:enable /V:RamDisk /X\"
    If 'Allocate Memory Dynamically' is disabled.
    Code:
    -p "/FS:NTFS /Q /Y /S:enable /V:RamDisk /X"
    GUI
    -p "format-parameters"
    If -p is specified the 'format' command is invoked to create a
    filesystem when the new virtual disk has been created.
    "format-parameters" must be a parameter string enclosed within
    double-quotes. The string is added to the command line that starts
    'format'. You usually specify something like "/fs:ntfs /q /y", that
    is, create an NTFS filesystem with quick formatting and without user
    interaction.

    format

    /FS:filesystem Specifies the type of the file system (FAT, FAT32, exFAT,
    NTFS, UDF, ReFS).

    /Q Performs a quick format. Note that this switch overrides /P.

    /Y Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively.

    /S:state Specifies support for short filenames (enable, disable)
    Short names are disabled by default

    /V:label Specifies the volume label.

    /X Forces the volume to dismount first if necessary. All opened
    handles to the volume would no longer be valid.

    Code:
    "%ProgramFiles%\ImDisk\RamDyn.exe" "MountPoint:" <SizeInKB> -1 1 20 "-p \"/FS:NTFS /Q /Y /S:enable /V:RamDisk /X\""
    
    "%ProgramFiles%\ImDisk\RamDyn.exe" "R:" 1048576 -1 1 20 "-p \"/FS:NTFS /Q /Y /S:enable /V:RamDisk /X\""

    "RamDyn.exe MountPoint Size|ImageFile CleanRatio|TRIM [CleanTimer CleanMaxActivity] PhysicalMemory BlockSize AddParam"

    "* MountPoint: a drive letter followed by a colon, or the full path to an empty NTFS folder."
    "* Size|ImageFile: size of the volume, in KB. With at least one non-numeric character, it is assumed to be the name of an image file to load. "
    "0 triggers the cleanup function for the specified mount point, if TRIM is not used (following parameters are ignored)."
    "* CleanRatio: with -1, TRIM commands are used in replacement of the cleanup function, and the 2 following parameters are not used; "
    "otherwise, it's an approximate ratio, per 1000, of the total drive space from which the cleanup function attempts to free the memory of the deleted files (default: 10)."
    "* CleanTimer: minimal time between 2 cleanups (default: 10)."
    "* CleanMaxActivity: the cleanup function waits until reads and writes are below this value, in MB/s (default: 10)."
    "* PhysicalMemory: use 0 for allocating virtual memory, 1 for allocating physical memory (default: 0); "
    "allocating physical memory requires the privilege to lock pages in memory in the local group policy."
    "* BlockSize: size of memory blocks, in power of 2, from 12 (4 KB) to 30 (1 GB) (default: 20)."
    "* AddParam: additional parameters to pass to imdisk.exe. Use double-quotes for zero or several parameters. (don't forget to escape the quotes with \ ).",
    Code:
    https://reboot.pro/index.php?s=51bb78e730b2735a2fb56da5c07af66b&showtopic=20150&page=3#entry212477
     
    Last edited: Oct 30, 2022
  15. busy

    busy Registered Member

    Joined:
    Apr 10, 2006
    Posts:
    507
    You can do it like below without using LABEL and fsutil.
    Code:
    imdisk -a -s 1G -m R: -p "/fs:ntfs /q /y /v:RAMDisk /s:enable"
     
  16. APMichael

    APMichael Registered Member

    Joined:
    Jun 17, 2020
    Posts:
    128
    Location:
    Germany
    @busy Thanks for the great compilation of command line parameters. I think I had really overlooked at the time that the -p parameter simply represents the forwarded parameters for the classic "format" command. :argh: Then I can collapse my batch file to a single command line. :thumb:
     
  17. busy

    busy Registered Member

    Joined:
    Apr 10, 2006
    Posts:
    507
    Registry setting seems to be working but not setting the VolumeFlag for it on the volume?

    dir R: /x lists generated short names too when sandboxie showing a warning for it.

    Video ~5 MB mp4
    Code:
    https://easyupload.io/qmx7vg
     
    Last edited: Oct 29, 2022
  18. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,257
    Location:
    .
    I got this
    01.png

    The I add this cmd line
    Code:
    "%ProgramFiles%\ImDisk\RamDyn.exe" "R:" 1048576 -1 1 20 "-p \"/FS:NTFS /Q /Y /S:enable /V:RAMdisk /X\""
    
    02.png


    Then I get this
    03.png
     
  19. busy

    busy Registered Member

    Joined:
    Apr 10, 2006
    Posts:
    507
    @Mr.X That's only for command line use. For UI:

    Code:
    -p \"/FS:NTFS /Q /Y /S:enable /V:RamDisk\"
     
  20. Mr.X

    Mr.X Registered Member

    Joined:
    Aug 10, 2013
    Posts:
    5,257
    Location:
    .
    @busy

    Now I get and it's correct
    Code:
    C:\Windows\system32>fsutil 8dot3name query R:
    The volume state is: 0 (8dot3 name creation is enabled).
    The registry state is: 0 (Enable 8dot3 name creation on all volumes).
    
    Based on the above settings, 8dot3 name creation is enabled on R:
    
    Now virtual drive R: RAMdisk has 8.3 name capability.
    No more SbieCtrl_HideMessage=2227 needed.

    Thanks a lot for your kind help.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.