I wanted the ability to right click on a PS1 file and then execute a powershell script. (A “run powershell script” from Context-Menu option)
So here is how you can do it:
Copy the following text into a text file and save it:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\Shell\Run with powershell] [HKEY_CLASSES_ROOT\*\Shell\Run with powershell\command] |
Save the file and rename it to have an extension “.reg”. Now double click the file and you will have a context menu called “Run with powershell”
To make life easier you can download my version of the file from:
https://docs.google.com/open?id=0BzvtUeIvT94wMzg1MWRjZjEtZTUyNi00YTlkLWJhMDUtYjczMTljYzdmNmYy
No comments:
Post a Comment