I've just started using Windows 7 and am instantly finding one aspect pretty annoying.

When I open certain files from Windows Explorer / Windows Search results etc then I then cannot save them as it throws up the following message box.

You don’t have permission to save in this location. 
Contact the administrator to obtain permission.

Would you like to save in the My Documents folder instead?

[Yes] [No]

However I can't see any way of opening the file with elevated permissions.

Is the only workflow to first open the application with elevated permissions then open the file?

  • 1
    have you tried opening the explorer itself with elevated permissions? Dec 29 '10 at 11:01

When i ran into this issue i worked around it by opening the file, making my modifications, then saving the file to the desktop with the same name and extension. Then i find where its on the system, and drag the modified file from the desktop to the folder it belongs. Hurray MS security.....

  • That's a shame I was sure that there would be some straight forward work around that would allow me to continue to use the paradigm for working with files that I'm used to. It seems not then! Dec 29 '10 at 17:47

Yes, you have to start the application with elevated permissions first. What you can do to make things a little easier is drag the file from Windows Explorer and drop it over the elevated window of Notepad (in this case).


As an alternative, first create a textfile called elevate.js containing

// elevate.js -- runs target command line elevated
if (WScript.Arguments.Length >= 1) {
    Application = WScript.Arguments(0);
    Arguments = "";
    for (Index = 1; Index < WScript.Arguments.Length; Index += 1) {
        if (Index > 1) {
            Arguments += " ";
        Arguments += '"' + WScript.Arguments(Index) + '"';
    new ActiveXObject("Shell.Application").ShellExecute(Application, Arguments, "", "runas");
} else {
    WScript.Echo("elevate Application Arguments");

create a windows explorer shortcut to an editor using elevate.js, for example import this .reg file:

Windows Registry Editor Version 5.00

@="Edit with GVim (elevated)"

@="c:\\windows\\system32\\wscript.exe c:\\bin\\elevate\\elevate.js \"C:\\Program Files (x86)\\Vim\\vim73\\gvim.exe\" \"%L\""

Now you can right click on a file to start an elevated editor.


Open notepad.exe with admin permissions, then do a file-Open, navigate to the hosts file.

Right click on notepad.exe or a shortcut to notepad and select run as administrator.

I don't suggest actually changing permissions on the hosts file or other protected Windows files or folders, that is a bad idea.

  • 1
    Yes this is the workflow I give in the question. I'm asking for alternatives. Dec 29 '10 at 17:43
  • Only other solution is to enable the hidden admin account and use that, I don't recommend it for every day use though.
    – Moab
    Dec 29 '10 at 23:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.