#_ITandME blog

Editing Windows Registry via cmd.exe


Here is a fun regedit I like to use to add cmd.exe to my right-click menu. I've tested in Windows 7 and 10...maybe 8 as well but we don't really care about 8, do we?

                
                        REG ADD "HKCR\Directory\Background\shell\cmd.exe" /ve
                        REG ADD "HKCR\Directory\Background\shell\cmd.exe\command" /ve /d "C:\Windows\System32\cmd.exe"
                
                

Really we can use this for any program locally installed on the system. The first line creates a registry key called cmd.exe. The second adds the default command that will run when that key is called. Pretty simply stuff, but neat to play with.