6

I would like to open a third party (i.e.: Rufus) application when I right-click on a drive and select format..

How do I go about doing this?

For items like Notepad, I can just swap the file in windows system folder, this does not seem to work in this particular case, or at least, I haven't found a way to do so.

Ole Aldric
  • 451
  • 5
  • 17
  • 1
    Just an FYI, you should never change or replace any of the binaries in the Windows directory, as you're simply creating more problems than you're solving. 99.9% of files in `%WinDir%` are not customizable (files in `%WinDir%\System32\Drivers\etc` are a rare exception) and have an associated hash that is checked against its backup in `%WinDir%\WinSxS` by both `DISM` and `SFC`, and if the hash doesn't match, the file is marked corrupt and replaced by it's known good copy in `%WinDir%\WinSxS`. Additionally, bi-annual updates to Win10 will also replace a file with mismatching hashes in `%WinDir%` – JW0914 Aug 19 '19 at 15:33

2 Answers2

3

The Format command in Explorer is built-in and not easily modified.

One poster has deeply analyzed the problem and summarized his efforts in the post Replace Windows' drive format tool with Rufus, where he is asking for help in creating a full solution. Unfortunately, I don't see any way to finish his work.

It would have been possible to add a Rufus entry to the context-menu of all drives with a registry update such as the below .reg file (very generic and untested):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Drive\shell\rufus]
@="Rufus on drive"

[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="\"C:\Program Files (x86)\Rufus\Rufus.exe\" %1"

Unfortunately, this would be useless, since the Rufus Wiki post Command line arguments #111, where users ask for command-line arguments for Rufus, has this final text from the Rufus developer:

I have to stress out, commandline support is at least years away, so there's no way I'm going to go into details on how I'm planning to address something that is that far out, as things can and do change when a lot of time elapses.

Without command-line support, there is no way to pass the drive-letter to Rufus. Therefore there is no point in adding such an entry to the context-menu of Explorer, as all it would do would be to call up Rufus, just the same as calling it from the Start Menu or from a desktop icon.

harrymc
  • 455,459
  • 31
  • 526
  • 924
  • To expand on your answer, a roundabout solution would be using a Context Menu tool from Nirsoft, Yamicsoft, etc. to remove "Format" from the Context Menu and then merge the registry key with its name as "Format". To have the registry added option appear in roughly the same spot in the context menu, add the String: `"Position"="Middle"` – JW0914 Aug 19 '19 at 15:42
0

You can't as long as you use windows explorer. Format doesn't seem to be an application by itself, but a context of explorer itself.

You'll notice that when you select format, the whole context it's of the drive that was already highlighted on This PC.

If you hover over it with process explorer target icon, you'll notice that it never show's a program running, but if you expand COM Surrogate you'll see the window in there, thus making the format tool a library being used by explorer to show the format tool. There are many reasons for this but I don't think there's a way to replace this without replacing explorer, probably you can interface with Format tool, and you may be able to expand it, but not replace it, and when I mean to expand it I mean create a separate tool off of that tool, not replace the one that shows up in the context menu.

I know it may not sound complete, but it's the best I've got.

ddemuro
  • 31
  • 2
  • How about removing the context (leaving it blind) and replace it with arcane registry magic to initiate some TPA with switches like from cmd? Not sure if there is a possibility to fetch resources (like drive) from the registry? – Ole Aldric Aug 13 '19 at 18:57
  • You could add a new entry to the context menu from the registry? But I don't think you'll be able to change the Format option already there. I don't believe Windows offers a place to swap that out without modifying explorer by itself. – ddemuro Aug 13 '19 at 19:40