Disable Annoying “Disk not formatted” Dialog on Vista/Windows 7

Screenshot of format dialogOther than disabling autorun completely, there is no official way to stop the “You need to format the disk in drive X before you can use it” dialog from popping up every time you connect a drive with unknown (ie. non-FAT/NTFS) partitions, or when you accidentally click on it. Because my external drives are fully encrypted, this message appears every time I connect them, and if you mistakenly press the wrong button you have to be fast to stop it…
I’ve been using a self written [url=http://www.autohotkey.com/]AutoHotkey[/url] script to immediately close the dialog as soon as it appears for a few weeks now, and it works great. It sits in my tray, waits for the dialog and then closes it without me even noticing it. It takes virtually no resources, and doesn’t do busy waiting thanks to the WinWait command of AutoHotkey.


To detect the window, it waits for class #32770 (a standard Win dialog window) that has “Datenträger formatieren” as a button. You have to be aware of that, because the script obviously needs localization changes and might close other dialogs that contain this text, but I’ve been using it for a while now and never noticed had any side effects. If you leave it in the tray, you can always pause or close it in case you want to format a new drive using that dialog.
Loop {
  WinWait, Microsoft Windows ahk_class #32770, Datenträger formatieren
  WinClose
}

Add #NoTrayIcon to the script to get rid of the tray icon.

You may also like...

6 Responses

  1. Jeff says:

    >>Other than disabling autorun completely, there is no official way to stop the “You need to format the disk in drive X before you can use it”
    FYI: This is wrong! The official way is to simply remove the drive letter from that specific partition in disk management…

  2. Moritz says:

    Neat solution, thanks, didn’t think about that. Of course it only works for known drives, and I’m not sure it’ll work for every partition encryption software (ie. that the drive letter is shown once the partition is decrypted).

  3. nw says:

    many softwares which encrypt the whole drive require a drive letter, so deleting it is not the solution. this script works fine, it’s the best solution i currently find:)

  4. jb says:

    You can’t disable it for removeable drives since they don’t show up in disk management. Any clues?

  5. jan says:

    OK, but what if i NEED to have the drive letter assigned to “unknown” disk???

  6. Laurence says:

    Hi there,
    Just tried this on my Windows 8 Pro 64bit PC, and I could not get it to work.
    I have an external hdd that has two NTFS file systems and one RAW file system which I load Wii Backups on (WBFS file system). I just don’t want the stupid message popping up all the time…
    I know it off by heart now:
    Microsoft Windows
    You need to format the disk in drive W: before you can use it.
    Do you want to format it?
    Format Disk Cancel
    I need to be able to have the letter in the drive, so the comment Jeff made cannot work for me…
    Surely there must be a way to lock a drive so that even if you did press “Format Disk” by accident, it would ask for a password or something?
    Seems like you guys want the same as me though (except you have Windows Vista)
    Any suggestions?
    Thanks,
    Laurence =]

Leave a Reply

Your email address will not be published. Required fields are marked *


7 − = one

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>