Select Page
This entry has been published on 2016-01-26 and may be out of date.

Last Updated on 2016-01-26.

[:en]In companies where users have write access to huge directory structures, it might happen from time to time someone unknown accidentally moves a folder using the drag&drop feature in Windows Explorer.

This site offers a tool which shows a confirmation dialog before the files or directories can be moved.

Note: For Non-English Windows systems, you have to do some registry modifications to make it work.

The following snippet is for German Windows (tested with 7 and 8.1 x64, should also work with 10).

First use the DragDropConfirm installer (parameter /S is silent), then copy these lines into a textfile (xxx.reg) and execute it:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\DragDropConfirm]
"AskTitle"="Sicherheitsabfrage - Verschieben"
"AskDescription"="Möchten Sie diese Datei bzw. dieses Verzeichnis wirklich verschieben?"
"Install_Dir"="C:\\Program Files\\DragDropConfirm"
"ItemText"="Hierher &verschieben"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\DragDropConfirm]
"Install_Dir"="C:\\Program Files\\DragDropConfirm"
"AskTitle"="Sicherheitsabfrage - Verschieben"
"AskDescription"="Möchten Sie diese Datei bzw. dieses Verzeichnis wirklich verschieben?"
"ItemText"="Hierher &verschieben"

The important part is the “ItemText” variable. If this one is wrong, the dialog does not pop up.

For other languages, please have a look at the advanced instructions and the comments there below.

 

UPDATE 2016-05:

The original software also shows the confirmation dialog when you use keyboard shortcut Ctrl + X / Ctrl + V, which you probably do not want. Additionally, the dialog might not get into foreground in all scenarios, e.g. if you move from one Explorer window to another.

As the original code has not been worked on for over a year (according to GitHub), I modified the code myself a little. You can download the package here, it includes source code and the installer.

Changes I made:

...
//added last 3 constants to make sure Dialog gets into foreground
int button = MessageBoxW(0, askDescription, askTitle, MB_OKCANCEL | MB_ICONEXCLAMATION | MB_DEFBUTTON2 | MB_SETFOREGROUND | MB_TOPMOST | MB_SYSTEMMODAL);
...

//Do not show dialog if Ctrl Key is pressed
if (GetAsyncKeyState(VK_CONTROL) < 0)
	return E_FAIL;

/* experiments
//Check the mouse left button is pressed or not
if ((GetKeyState(VK_LBUTTON) & 0x80) != 0)
{
	return hr;
}
//Check the mouse left button is pressed or not
if ((GetKeyState(VK_LBUTTON) & 0x100) != 0)
{
	return hr;
}

if (GetAsyncKeyState(VK_LBUTTON) >= 0) {}
return E_FAIL;
*/

 [:]