Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to always open any file w/ Notepad as Administrator


12 Jan 2010   #1

Windows 7
 
 
How to always open any file w/ Notepad as Administrator

I tried to figure out how to always open any file in Notepad as Administrator via the Explorer shell menu, and with some help from this forum, I have succeeded!

1. Enable the Built-in Administrator Account
2. Set the password on the Administrator account to, say, "YOUR_PASSWORD".
3. Run regedit.
4. Goto to HKEY_CLASSES_ROOT\*\shell\
5. Create a new key named "Open with Notepad (as Administrator)"
6. Select the new key, and create another named "command".
7. Right click on the value named "(Default)" and select "Modify...".
8. Set the value to "runas /savecred /user:HOSTNAME\Administrator "notepad %1"".
a. Ensure that you leave quotes around "notepad %1".
b. Ensure that HOSTNAME matches the name of your machine.

9. Right click on a text file, and select "Open with Notepad (as Administrator)" from the shell menu. You'll be prompted for the password that you provided in step 2. You will only be prompted for this password once (due to /savecred).

You might want to combine this tip with "Image File Execution Options" to replace the built-in notepad with a better one (like Notepad2).

One annoying downside of this method is that even after you provide the password, a command prompt briefly flashes before opening notepad. I'm not sure how to prevent this.

Also, I'm not sure if you'll have to reenter the Administrator password after rebooting or otherwise logging out (haven't tested that yet).

My System SpecsSystem Spec
.

Reply

 How to always open any file w/ Notepad as Administrator




Thread Tools



Similar help and support threads for: How to always open any file w/ Notepad as Administrator
Thread Forum
Open File - Security Warning, (IE, Notepad, etc.), 7 Home Prem System Security
Text File does not open with Notepad Software
Solved Can't open notepad as a administrator General Discussion
Force notepad to run as administrator System Security
Trying to copy txt file in Notepad. "Notepad: Access is denied" General Discussion
.vbs file open with notepad...how to change??? General Discussion
files open up to notepad General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 04:40 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33