Disable Annoying “Disk not formatted” Dialog on Vista/Windows 7
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” 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.
WinWait, Microsoft Windows ahk_class #32770, Datenträger formatieren
#NoTrayIcon to the script to get rid of the tray icon.