- How to add batch-script action to Right Click menu
- Adding Powershell command to right click menu both on and in a folder
- Context Menu to Execute a powershell script within selected directory
- How to pass an argument to a PowerShell script?
- Unable to find type [System.Windows.Forms.MessageBox]
- How to Add Icon to Right-Click Menu in Windows 7 and higher
- Opening PowerShell Script and hide Command Prompt, but not the GUI
- Powershell command line options
When you double click a .reg
file, it will automatically install in the registry (cmd regedit
)
The basic registry pattern is:
HKEY_CLASSES_ROOT\Directory\Shell\<Script_Name>
HKEY_CLASSES_ROOT\Directory\Shell\<Script_Name>\command
Adding the \Background
to the key will also add the context menu to an already open folder
HKEY_CLASSES_ROOT\Directory\Background\Shell\<Script_Name>
HKEY_CLASSES_ROOT\Directory\Background\Shell\<Script_Name>\command
Characters in the command need to be escaped twice, once on parsing into the registry, and once on execution
Available commands to pass are %L
or %V