This script customizes the right-click context menu in Windows Explorer to add options for opening PowerShell at specific locations. It creates two context menu entries, one for the background of a directory and another for the directory itself, allowing easy access to PowerShell from those locations.
-
Context Menu for Directory Background:
- Adds an option called "Open Powershell" when right-clicking on the background of a folder (the empty space within a folder in Explorer).
- When selected, it opens PowerShell with the current folder as the active directory.
-
Context Menu for Directory Itself:
- Adds an option called "Open in Powershell" when right-clicking on a folder.
- When selected, it opens PowerShell directly in the clicked folder.
-
Icon:
- Both entries display the PowerShell icon.
-
No Working Directory:
- Specifies that PowerShell should open without considering any previous working directory.
-
ShowBasedOnVelocityId:
- This value controls when and where the context menu items are shown, using a system velocity ID to control visibility.