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 :
- Win+R (Run)
- F: [ENTER] (or whatever the drive was)
- 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