Disable the "format disk" dialog

4

I have a USB flash drive which has Linux installed on it. Now what I do is insert it into my computer and boot it inside an VM. Works great.

The only problem is, that Windows always asks me to format the drive, because it can (obviously) make no sense of it.

How do I stop these popups telling me to format my drive?

Note that the answers on similar questions concerning VeraCrypt didn't work for me (I can't change the drive-letter because it is grayed out. When clicking on the disk at the bottom view, it just tells me that the view hasn't been updated and that I should reopen Disk Management or reboot my Computer. I did both 3 times.)

I also tried disabling AutoPlay (Control Panel\Hardware and Sound\AutoPlay) by unchecking "Use AutoPlay for all media and devices" and by specifically selecting "Take no action" for "Removable drives". Second attempt was to disable this using the registry also didn't work.

redxef

Posted 2018-10-08T20:53:04.103

Reputation: 161

According to many Windows forums it can't be disabled. – None – 2018-10-08T21:04:37.997

@Albin updated my answer to reflect the way I did that, but I only now realised, that there also (of course) is a registry key, will tweak that. – redxef – 2018-10-08T22:05:41.547

@redxef you're way should have worked, but sometimes the UI of windows isn't that great, so I would just check if the regestry value has been updated to 0xFF. If it is, you're autorun should be disabled completely (I still would test it though) – Albin – 2018-10-08T22:10:31.157

Answers

1

There is suppose to be a way that works with Win10 by editing the registry where the Volume Identifiers are stored. A full description can be found here.

As a temporary workaround (or a final one if you don't get anything else to work) you can use a workaround though Authotkey. You can setup a script that immediately closes the format window after it comes up. Here is a description how to do it.

Concerning deleting the drive letter: I didn't try it, but you can also remove a drive letter using diskpart, did you try that option running diskpart with administrator privileges?

Another option would be to disable the autorun through the registry (so all types of autoruns are disables), here's an explanation how. But I'm not sure if this will effect the formatting dialogue.

Albin

Posted 2018-10-08T20:53:04.103

Reputation: 3 983

Will try the Windows 10 version. The second option wont be acceptable, because that would render the os useless. Third option is a last resort. – redxef – 2018-10-08T21:42:23.643

@redxef Let me know if it works. Why would the second render the OS useless? – Albin – 2018-10-08T21:44:05.067

@Albin Because the drive has a Linux distro already installed and probably formatted as EXT4, a file system Windows doesn't understand - reason why it asks for formatting - and cannot recreate. – None – 2018-10-08T21:53:02.373

@Albin Because that Stick needs at least 2 partitions, the first being an efi volume, the second an ext4 volume. Formatting it with MBR and a fat32 and then putting an iso of the os onto it would not make it bootable anymore. Which is the intent behind it, otherwise I would just use a virtual hard disk and be done with it. And merging the two partitions and letting the os live in a fat filesystem isn't that great of a solution either. – redxef – 2018-10-08T21:53:06.010

@Albin but if I dd it back on it will restore the usb to the exact same layout as before. I'll try it tomorrow when I have enough time on my hand, but doubt it will change anything. Thanks for your help in any case. And concerning the importance, it's not as important as I might make it seem, but I still use it often enough and got backups :) – redxef – 2018-10-08T22:00:04.977

@Albin Now reading the answer you linked I'm convince you misunderstood it. The other question is also about an unrecognized file system that's triggering the format dialog. The answer proposes a workaround: Instead of having a TC encrypted partition Harry suggested a TC container file inside a known (for Windows) partition. Of course this workaround works for the purpose of the other answer but in this case is a pure waste of time, as soon as you reimage the drive the "problem" will be the same. – None – 2018-10-08T22:10:43.547

@GabrielaGarcia you are right, I removed it. – Albin – 2018-10-08T22:14:32.610

0

Regarding the option below being grayed out, make sure you are selecting the correct drive (F:) I had accidentally selected the incorrect one and the option was grayed out for me.


While the USB is plugged in, run Computer Management (compmgmt.msc) and unassign the drive letter from that disk.

  • Right click → Change Drive Letters and Paths...

  • Select F: and hit Remove

A warning will come up:

enter image description here

Click Yes.

WELZ

Posted 2018-10-08T20:53:04.103

Reputation: 176

I thought this only worked until you unplugged it and plugged it back in? – acejavelin – 2018-10-08T21:12:47.980

I can't change the drive-letter because it is grayed out. Your proposed solution was already tried by the OP. – None – 2018-10-08T21:20:23.570

@acejavelin just tested it, no error comes up - when I reattach the drive letter, I immediately get the message. – WELZ – 2018-10-08T21:22:06.627

@GabrielaGarcia I had a similar error, updated my answer. – WELZ – 2018-10-08T21:24:14.387

Have you tried with an unformatted (or formatted with a file system not recognized by Windows) drive? – None – 2018-10-08T22:03:41.790

Yep, I first got the error, followed the steps, unplugged a few times, then reattached the letter and got the error. – WELZ – 2018-10-08T22:23:04.653