Scott Hanselman

This script alone will save me >=15 minutes a day...

February 05, 2003 Comment on this post [0] Posted in Web Services
Sponsored By

' Source: MSDN Magazine Article by Dino Esposito...
' ContextMenu.vbs
' Adds a 'View with Notepad' menu item to any file's context menu
' -----------------------------------------------------------
Option Explicit

Dim shell
Dim REG_HKCR_ALL

' The registry path where our new entries should be added
' If your registry doesn't contain a Shell node,
'   it'll be silently created
REG_HKCR_ALL = "HKCR\*\Shell"

' Adds a new key and a couple of entries.
'   (The item will have an underlined 'N')
Set shell = CreateObject("WScript.Shell")
shell.RegWrite REG_HKCR_ALL & "\Notepad\", _
               "View with &Notepad", _
               "REG_SZ"
shell.RegWrite REG_HKCR_ALL & "\Notepad\Command\", _
               "%WINDIR%\notepad.exe %1", _
               "REG_EXPAND_SZ"

Sigh...and all these years, I've been typing "WindowKey-R-n-o-t-e-p-a-d-Enter" then alt-tabbing, starting a drag then alt-tabbing and dropping onto Notepad all in ~650 milliseconds, and I thought nothing could be faster...;)

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.