Comments (12)
I found a workaround for this issue: you can use GetShortPathName
function to generate a DOS-compatible name, and that name will work.
from detours.
I found a workaround for this issue: you can use
GetShortPathName
function to generate a DOS-compatible name, and that name will work.
If I remember correctly, I did try that during my tests, and while it worked for some directories, some still threw an error.
from detours.
@sp00n if I'd be guessing I'd say it would not work for relative paths, but should have worked for absolute ones.
from detours.
Short names are not always turned on in the filesystem with Windows these days.
They can be useful as one possible workaround, but they won't always be available. It depends how the filesystem was formatted. Maintaining the short names, and testing for two names instead of one each time, slows down filesystem operations slightly, which I think is the main reason they aren't on all the time. That and not much software requires them anymore.
The default for Windows seems to have changed back and forth a few times in recent years, in my experience, but maybe there's more to it (e.g. Home vs Pro versions could be a factor). I don't know the exact rules for when they're on by default, as they seem to change, but people can also override that and turn them on or off if they wish. So you cannot depend on 8.3 names existing these days.
from detours.
@LeoDavidson AFAIK by default they are on on NTFS and AFAIK ReFS can not be booted from. I can't imagine even 0.1% of all Windows users turning them off, so it should be a fine workaround. And the 0.1% users can turn them back on if they really need my software.
But this is still just a workaround. A proper fix should be implemented eventually one way or another.
from detours.
They are not always on by default these days, and also not always on for every drive in a system either. That's the problem.
This SuperUser post has an answer saying Windows 8 and Server 2012 turned short names off by default, which fits with my memory of when it changed:
It's possible Microsoft reversed the decision again in later OS but I'm not sure. You can't depend on them being there in any case.
from detours.
Ah, I think it was disabled by default on my NVMe drives, which is why I quickly abandoned it.
// Edit
My HKLM\System\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation
setting is set to 2, which according to the SuperUser link above means it "Sets 8dot3 name creation on a per volume basis".
And using the fsutil 8dot3name query DRIVELETTER:
command revealed that only some of my drives/partitions have it enabled, for no apparent reason (that I can think of).
The SATA SSD boot drive has it enabled, two of my SATA HDDs don't, but the third one does, for the NVMe it's disabled, as well as for two attached USB drives. 🤷♂️
from detours.
@sp00n AFAIK off on ReFS
from detours.
@sp00n AFAIK off on ReFS
All my partitions are in NTFS though.
from detours.
Related Issues (20)
- Bug: Error process of GetQueuedCompletionStatus in syelogd.cpp.
- Divide by zero in 'cping.cpp'
- Bug: DetourOpenBinary doesn't accept valid PEs because of incorrect limit on sections
- API Refernce on Home Page of Wiki doesn't redirect properly
- hooking HeapAlloc in multi-thread triggers exception if there is thread_local variable used in hooked function
- Sample trcapi is causing an exception on a .NET (64 bit COR) executable HOT 1
- Detours throws
- Unexpected Behavior: DLL loading error when recursively calling a mix of 32-bit and 64-bit subprocesses
- Hook on return
- This repo is missing important files HOT 6
- NMAKE failing at the end. HOT 4
- NMAKE failed HOT 1
- Windows 11 ARM64 Processor x86, x64 COM API Hook Crash.
- `detour_skip_jmp` for x64 doesn't support `rex.w` prefix
- Wiki is missing sample tracessl
- `detour_skip_jmp` for arm64 doesn't support unconditional branch HOT 1
- `detour_sign_extend` is implemented incorrectly
- Noting the Optimizations greatly influence the result
- return value of 'main()'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from detours.