Windows Shell context menu option

I need to create an option for all files that will run a batch file located in the windows directory or any other directory.

The batch file will basically delete files as well as delete it from another server.

I need a batch file that you only need in the context menu.

+2


source to share


1 answer


You need to create the following registry entries:

HKLM\Software\Classes\*\shell\yourappname
HKLM\Software\Classes\*\shell\yourappname\command

      

the first registry entry is a key, the second is a string value. Set the command value in the path to your batch file eg. "c: \ batch.bat% 1"



"% 1" will replace the path where the context menu was shown.

The "*" entry is for all files. If you want your menu to appear in folders / drives / whatever, you must also add the same registry keys / values ​​for them, for example

HKLM\Software\Classes\Folder\shell\yourappname
HKLM\Software\Classes\Folder\shell\yourappname\command
HKLM\Software\Classes\Directory\shell\yourappname
HKLM\Software\Classes\Directory\shell\yourappname\command
HKLM\Software\Classes\Drive\shell\yourappname
HKLM\Software\Classes\Drive\shell\yourappname\command

      

+6


source







All Articles