Enhance Windows 7 Right Click Menu Adding “Open With Notepad” and “Take Ownership”

Here, in Tech-Tips-Geek we are in a mission of making complicated things as simple as possible. In Windows 7 many features had been added, considering the importance of user convenience. But here the magic continues with Windows  Operating System. You can make Windows more simple to use as your need. Today I’m going to introduce such one. In Windows 7, the right click context menu makes some of your task so easy and shortcut. By adding more features in the context menu you can relief yourself from some long procedure. e.g – You can add “Open with Notepad” for any file and “Take Ownership” in your right click context menu. Continue reading to learn in details.

1. Add “Open with Notepad” for any file in Windows 7 Right-click context menu

A very common experience of the Windows user is that when they open an unknown file, by default they are forced to choose an application from a list. To avoid the annoying task every time, I propose to add the “Open with Notepad” entry in your right click context menu. The process is nothing but a simple registry hack.

Open the registry editor by typing “regedit” in the “Run” box ( Win key + R ). In the registry editor navigate to the following path from the left pane:

HKEY_CLASSES_ROOT*shell

Create a new key “Open with Notepad” under shell by right-clicking on “shell” and selecting “New > Key”.

Again create a new key under “Open with Notepad” and give the name as “Command”. Now select the key “Command” and double click on the value “Default” to enter the following command in the value data field:

notepad.exe %1

Immediately after that you can see the entry “Open with Notepad” in context menu, when you right click on any file.

Note: If you replace the older Notepad with Notepad2 in Windows7 then the entry “Open with Notepad”is automatically added to the right-click context menu.

2. Add “Take Ownership” in the Windows7 Right-click context menu

In Windows7 you are not allow to access a system folder or file for its security purpose until you take the ownership of that. By adding “Take Ownership” in right click context menu you can easily take the ownership of a system file or folder and easily access it. It is a registry tweak. Follow the process described bellow.

  • Open any text editor. Notepad is recommended.
  • Copy and paste the following codes
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT*shellrunas]
@="Take Ownership"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT*shellrunascommand]
@="cmd.exe /c takeown /f "%1" && icacls "%1"
 /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f "%1" && icacls "%1"
 /grant administrators:F"

[HKEY_CLASSES_ROOTDirectoryshellrunas]
@="Take Ownership"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOTDirectoryshellrunascommand]
@="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1"
 /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f "%1" /r /d y && icacls "%1"
 /grant administrators:F /t"
  • Save the file as “take _ownership.reg”. ( When saving, change the “Save as type” to “All Files” )
  • Now double click on “take_ownership.reg”.

After that you should get a security message. Click on “Yes”.

  • You are done.
  • You can see the entry “Take Ownership” in the right-click context menu when right-clicking on any file or folder.

If you want to remove the “Take Ownership” entry from your context menu then create another .reg file with the following codes

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT*shellrunas]

[-HKEY_CLASSES_ROOTDirectoryshellrunas]

Save it as Remove.reg. Now double click on it. Click “Yes” to allow for editing the registry. Notice that the entry has been vanished from the right-click context menu.

Note: Both of the above processes are about to edit the registry. So keep the backup of your registry file before editing it.

One thought on “Enhance Windows 7 Right Click Menu Adding “Open With Notepad” and “Take Ownership””

Leave a Reply

Your email address will not be published. Required fields are marked *