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: Security issues (Access Denied)

30 Nov 2012   #21

Windows 7 Ultimate x64

I right-clicked on the file, selected properties and then the security tab, clicked "edit" and answered the UAC prompt, added myself explicitly to the security info, set "full control" and I can now edit the file with Notepad++

The temptation is to leave it like that, but I'll remove my access now I've achieved what I want.

I may create a little batch jpb to do this with CACLS.

Ah. It appears that CACLS is "deprecated", I should use ICACLS now.


I have two little batch files (you'd need to change this to use your favourite editor)


icacls c:\windows\system32\drivers\etc\hosts /grant %username%:(F)
"C:\Program Files (x86)\Notepad++\notepad++.exe" c:\windows\system32\drivers\etc\hosts
icacls c:\windows\system32\drivers\etc\hosts /remove %username%
You need to run this in a DOS session running elevated - I have a shortcut pinned to my start menu that starts the command shell, with "run as administrator" set. I've also changed the colours so it's obvious that it's the "all-powerful" version.

If there's a way to stall the CMD processing while the editor is active, this could all be done in a single batch file, removing the possibility of forgetting the save.

My System SpecsSystem Spec

 Security issues (Access Denied)

Thread Tools

Similar help and support threads
Thread Forum
Simcity 4 Deluxe Edition Access denied issues
I have never had this message in the past, but everytime I click on the simcity 4 icon, I receive this message I have already attempted re-starting my computer, I have run as administrator several times, but I continue to receive the same message. Any aid would be greatly appreciated!
Security & Permissions Too good? - Error 5 Access is denied.
My not quite 3 months old Win 7 system has taken a notable dislike to me trying to install programs now that I have an actual need to burn some disks of the data and DVD kind. For certain programs I am getting that lovely little message box which states; "Unable to execute file in the temporary...
Cannot start Windows Security Center Services. Error 5 access denied
I had trouble updating the MSE definitions a couple of days ago and I tried everything to get it to update, something about no connection. I gave up and uninstalled MSE completely using Revo. From Microsoft's web site, I downloaded and installed the newest version of MSE and the definitions updated...
System Security
Win 7 - Local Security Policy, Access Denied
Norton/Symantec, in its ever-ibimitable wisdom installs its Internet Security and Utilities packages into a locked folder(s). By locked I mean that one CANNOT modify (Rename, Delete, etc) the installed folder(s) and any of its sub-objects. I AM an administrator user, so I SHOULD (expect to) have...
General Discussion
Access denied and user privileges issues
Hi, I am experiencing weird issues with my Windows 7 64bit Pro installation. Some, but not all, programs won’t start, giving me a “The application was unable to start correctly 0xc0000022 click ok to close the application” error. It seems that 0xc0000022 is linked to some kind of access denied...
BSOD Help and Support

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 20:24.
Twitter Facebook Google+