Comments (16)
@T8z5h3 yes, but in this case, it is the API that you are referring to itself that has apparently been deprecated, which is the reason for my surprise.
from winfile.
I think we should have that menu item just call the native Windows format disk UI, the one you get when you right click a drive on file explorer and click "Format Disk...".
from winfile.
I like @NazmusLabs's suggestion of invoking the current Windows format disk UI (shown below). However, I also have a concern with this approach.
Today when a user invokes this UI from the shell, explorer.exe calls ShFormatDrive which displays the UI. Unfortunately, MSDN says that ShFormatDrive is deprecated. So if we want to use this exact UI, we'll need to rely on a deprecated function. Of course explorer.exe is still using it, so that's something. I haven't yet come across a supported Windows API function that does the same thing.
from winfile.
PR #108 submitted. I went with the SHFormatDrive approach.
from winfile.
Would make sense, it seems the item is enabled based on the value of nFloppies
And as you can see that value is calculated based on the assumption a removable drive is a floppy disk so as far as the logic cares your external harddrive is a floppy
from winfile.
@ZanderBrown nice! Thanks for confirming my assumption. So it appears it may not have anything to do with having a card reader, but rather any removal drive. π
from winfile.
ether that or call disk management MMC
from winfile.
@daviunic - Are you referring to the menu item in the screenshot below?
Because if so, it is always disabled for me (and I would assume for most users today), because I have no floppy drives. See this line of code:
https://github.com/Microsoft/winfile/blob/a06f6f19a9eedbbd1fbcd6462737055be8c39eb9/src/wfinit.c#L411
I'm curious, is it enabled for you, and do you have a floppy drive on your system? Thanks!
from winfile.
It is clear that the old FormatDisk code isn't doing what we think is should. That's also true of other things like the old Security menu.
I would prefer to map out a simple approach to enable this functionality (FormatDisk in this case) or, if that is not possible, to delete the feature.
from winfile.
@matthewjustice it is enabled for me and invoking it causes the error I mentioned. No floppy drives, but I have a USB 3.0 + card reader combo device installed via USB 3.0 headers and for every type of card it supports it displays a drive in explorer, acting much like a floppy drive would. So it seems it misdetects removable drives which behave this way.
And I'm not sure why they would deprecate a function they continue to use anyway and fail to provide an alternative for.
from winfile.
@daviunic that would make sense because to windows your Card reader looks like a USB Floppy drive but i think how the programming interacts with the card reader is incomparable.
from winfile.
@matthewjustice I'm shocked to see this listed as deprecated. Usually things that get deprecated usually have had newer API calls or alternatives for a long time now. This doesn't seem to have any. Or does MS want to use the CMD for that now? And, like you said, Explorer uses this....
Regardless, I'm confident this feature won't go away anytime soon until Microsoft introduces an alternative and creates a redirect.
For example, the classic "calc" run command now redirects a call to launch the Calculator UWP app so that things like hardware calculator buttons on keyboards don't break.
from winfile.
@daviunic Thanks for confirming. Good to know that card readers can cause that menu option to enable.
@NazmusLabs Agreed that the deprecation it is a bit surprising without an alternative available! It does seem unlikely that support for it would be completely dropped in the near term.
from winfile.
@NazmusLabs i feel that microsoft want the programer to do the simplest things when it comes to formatting witch is why they have a API call for the built in formatting tool
from winfile.
Funny thing: it used to be disabled for me. Now it's enabled all of the sudden, and I don't know why. I don't have a card reader. I always had an external USB 3.0 hard drive. Perhaps it for disconnected and reconnected, causing file manager to enable it. Back in the early to mid 90s, a drive wouldn't just pop up on a running operating systems, as USB mass storage devices werent yet a thing. The only way to have a drive being added while the OS was running, I'd imagine, would be if a floppy was inserted. So, maybe, the fact that my external hard drive got disconnected an reconnected caused the drive to disappear and reappear on my PC, could have triggered the Winfile app to enable the menu item. I'll need to check the code to see if it include such trigger events. Either that, or someone else can explain it better.
from winfile.
We have a solution and there don't appear to be specific next steps here. Reopen if you disagree.
from winfile.
Related Issues (20)
- Doesn't appear to support "long paths" HOT 11
- Switching Option of Full-Width Katakana and Half-Width Katakana HOT 9
- Support for trash bin? HOT 5
- Start command shell in Administrator mode (Ctrl Shift K) starts in wrong folder HOT 5
- WinFile Portable released by PortableApps.com HOT 1
- Open Explorer.exe in selected directory HOT 5
- oomkilled HOT 1
- Question: How does non-OLE Drag and Drop work? HOT 2
- software and add-ons to edit and compile File Manager HOT 2
- Enhancement Request - Increase / Decrease Font using Ctrl + Mouse Wheel and / or new Toolbar Buttons HOT 6
- winfile do not work on windows pe 10 HOT 5
- Bug - Menu >> File >> Run for long command line gets truncated HOT 6
- Add create file option in context menu and toolbar HOT 3
- ζΊδΈιη HOT 2
- Folder is locked when expand the folder in left hand side HOT 2
- Read-only attribute on files copied from CD-ROM HOT 4
- Support sparse files? HOT 2
- How to specify the destination HOT 1
- I am off HOT 1
- Open File Manager starting in current folder, or folder specified on command line HOT 1
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 winfile.