Tag Archives: windows explorer

Windows Explorer contextual menu gotcha

Recently I had to extract the public key from a signed .NET assembly and I needed to run the sn.exe tool in order to obtain it. That required opening a command prompt and then setting the current directory to the one in which the assembly resided.

Typically I did :

  1. Win+R (Run)
  2. cmd
  3. Enter
  4. F: [ENTER] (or whatever the drive was)
  5. CD and either type the directory (using the TAB autocomplete or not) or copy the folder path and pasting it into the command prompt [ENTER]

Then I thought how can I simplify this little tedious task, which I sometimes do many times a day. After looking for Microsoft PowerToys which is no longer available I found out a little gem hidden in Windows Explorer. This is what my contextual menu looks like normally :

But just pressing (and keeping pressed) SHIFT before the right-click will give you this :

Selecting this command will do the opening of the command prompt and setting the drive and path in one click.

Of course, the next thing is to add the path to SN.EXE in the Environment Variable PATH in order to be able to execute it “anywhere”.

I hope this helps at least some of us 🙂