But did you know you can use Everything 1.5 for this too?
Wrote it over a year ago, but had only 3 lock-ups during that time, so it needs more (broader) testing.
How to use?
When a file can't be deleted (for example):
-
SHIFT-Right-click the file
- or -
SHIFT-Right-click an empty part in Explorer (or other file manager)
- or -
SHIFT-Right-click the foldername - Select Who opened this?
- The Opened By column shows the programs that opened this folder.
Installation
- Save OpenedBy.cmd on your disk
- Change the path to Everything(64).exe if needed.Currently:
Code: Select all
set EverythingEXE=C:\Program Files\Everything 1.5a\Everything64.exe
- Run OpenedBy.cmd
This will install the context menu entries - Done!
- Run OpenedBy.cmd
This will remove the context menu entries - Done!
OpenedBy.cmd
Code: Select all
@echo off & setlocal enabledelayedexpansion
rem echo on
cls
:: ===============================================
::
:: SETTINGS
::
:: ===============================================
::-----------------------------------------------
:: Location of Everything.exe (WITHOUT surrounding quotes)
::-----------------------------------------------
rem set EverythingEXE=C:\Tools\Everything\Everything64.exe
set EverythingEXE=C:\Program Files\Everything 1.5a\Everything64.exe
::-----------------------------------------------
:: Instance used for Everything (if not the default 1.5a or none)
::-----------------------------------------------
rem set EverythingEXE=C:\Tools\Everything\Everything64.exe
set Instance=
:: ===============================================
::
:: MAIN
::
:: ===============================================
::_______________________________________________
::
:: INIT
::_______________________________________________
::
If not defined ICON set ICON=%EverythingEXE%
::_______________________________________________
::
:: ACTION!
::_______________________________________________
::
set INSTALLED=0
REG.exe query "HKCU\Software\Classes\Directory\Shell\OpenedBy" 2>nul >nul && set "INSTALLED=1"
If [%INSTALLED%]==[1] (
REG DELETE "HKCU\Software\Classes\Directory\Shell\OpenedBy" /f 2>nul >nul
REG DELETE "HKCU\Software\Classes\Directory\Background\Shell\OpenedBy" /f 2>nul >nul
REG DELETE "HKCU\Software\Classes\*\Shell\OpenedBy" /f 2>nul >nul
mode 75,15
color 1F
echo.
echo.
echo.
echo. OpenedBy context menu entry REMOVED
echo.
echo. Re-run "%~nx0" to install again.
echo.
echo.
pause
EXIT /B
)
:: The following will only get executed when NOT installed
::-----------------------------------------------
:: Add contextmenu to registry for DIRECTORIES
::-----------------------------------------------
reg.exe add "HKCU\Software\Classes\Directory\Shell\OpenedBy" /v "Extended" /D ""
reg.exe add "HKCU\Software\Classes\Directory\Shell\OpenedBy" /v "MuiVerb" /D "Who opened this?"
reg.exe add "HKCU\Software\Classes\Directory\Shell\OpenedBy" /v "Icon" /D "\"%ICON%\""
reg.exe add "HKCU\Software\Classes\Directory\Shell\OpenedBy\Command" /ve /D "\"%EverythingEXE%\" -instance \"%INSTANCE%\" -s* \"%%1\" opened-by: columns:Name,opened-by,dm,Path"
::-----------------------------------------------
:: Add background contextmenu to registry for DIRECTORIES
::-----------------------------------------------
reg.exe add "HKCU\Software\Classes\Directory\Background\Shell\OpenedBy" /v "Extended" /D ""
reg.exe add "HKCU\Software\Classes\Directory\Background\Shell\OpenedBy" /v "MuiVerb" /D "Who opened this?"
reg.exe add "HKCU\Software\Classes\Directory\Background\Shell\OpenedBy" /v "Icon" /D "\"%ICON%\""
reg.exe add "HKCU\Software\Classes\Directory\Background\Shell\OpenedBy\Command" /ve /D "\"%EverythingEXE%\" -instance \"%INSTANCE%\" -s* \"%%V\" opened-by: columns:Name,opened-by,dm,Path"
::-----------------------------------------------
:: Add contextmenu to registry for FILES
::-----------------------------------------------
reg.exe add "HKCU\Software\Classes\*\Shell\OpenedBy" /v "Extended" /D ""
reg.exe add "HKCU\Software\Classes\*\Shell\OpenedBy" /v "MuiVerb" /D "Who opened this?"
reg.exe add "HKCU\Software\Classes\*\Shell\OpenedBy" /v "Icon" /D "\"%ICON%\""
reg.exe add "HKCU\Software\Classes\*\Shell\OpenedBy\Command" /ve /D "\"%EverythingEXE%\" -instance \"%INSTANCE%\" -s* \"%%1\" opened-by: columns:Name,opened-by,dm,Path"
:: (Not checking if succeeded)
mode 75,15
color 2F
echo.
echo.
echo. OpenedBy context menu entry INSTALLED
echo.
echo. Re-run "%~nx0" to remove.
echo.
echo.
pause
EXIT /B