Can you guys make this script work? http://superuser.com/questions/2681...cut-or-clear-undo-history-in-windows-explorer
I never use Ctrl+Z accidentally in Explorer but I can see the value in having such a script. I tried the script posted at the link and it doesn't work when the Desktop area is clicked/active so I googled around and tinkered and here's mine working in Windows 10 and the latest ahk program. I like to be prompted when I screw up so i kept the MsgBox in. Code: #IfWinActive ahk_class ExploreWClass ^z:: MsgBox Ctrl+Z has been disabled. return #IfWinActive ahk_class CabinetWClass ^z:: MsgBox Ctrl+Z has been disabled. return #IfWinActive ahk_class Progman ^z:: MsgBox Ctrl+Z has been disabled. return #IfWinActive ahk_class WorkerW ^z:: MsgBox Ctrl+Z has been disabled. return #IfWinActive
Thanks for checking, but I don't get it, is this script meant to disable the Ctrl+Z keyboard combo, or should it also block it from the context menu?
From my brief testing it will disable Ctrl+Z only if Windows Explorer is the active window or if the Desktop wallpaper is clicked. I'm not sure what you mean by block it from context menu. If a program has an undo button in the File menu and you clicked that this script would not block it if that's what you mean. I tested with MS Word, Notepad++, a renamed folder on Desktop and a renamed folder in another drive partition. Ctrl+Z was correctly blocked
When you right click on the desktop, you will get to see the context menu. My aim was to block the "Undo Delete (or copy)" option. Is this possible with this script?
OK, so if you click on the Undo entry in the context menu, files will still be moved back? Strange that M$ didn't give an option to turn this off, or to delete file operation history.