Get 'Run as administrator' for .log files in context menu

Discussion in 'Windows 7 Support' started by Hans L, Jul 12, 2018.

  1. Hans L

    Hans L

    Joined:
    Jan 3, 2010
    Messages:
    101
    Likes Received:
    2
    I have not been able to find a general method for adding 'Run as administrator' in Windows 7 context menu. I need it specifically for .log files now, but would like to have a generic method (if such exists) for any file.

    Help would be appreciated.

    Hans L
     
    Hans L, Jul 12, 2018
    #1
    1. Advertisements

  2. Hans L

    TrainableMan ^ The World's First ^ Moderator

    Joined:
    May 10, 2010
    Messages:
    9,250
    Likes Received:
    1,599
    Location:
    PA, USA
    A log file is not an executable so you aren't "running" it at all, as an administrator or otherwise. What you are doing is using a file association to run a program known to support .log file extensions. Therefore you would need to find the actual program that you trigger & right-click on it & set it to "always run as an administrator". But why you would do that I don't know because I can't think of any reason you should need to be an admin to look at a log file; it is simply a txt file and is probably just opening with Notepad.exe.
     
    TrainableMan, Jul 13, 2018
    #2
    1. Advertisements

  3. Hans L

    Hans L

    Joined:
    Jan 3, 2010
    Messages:
    101
    Likes Received:
    2
    I understand. No "run" in this case.

    This log file was produced when I run scannow, and it is C:\Windows\Logs\CBS\CBS.log. When I try to open it (with Notepad), I get "Access is denied". I guess this happens seldom enough so that I can open Notepad and set it to run as admin and then open the file in question. However, it would be better if Notepad runs as admin always (which you said above), in which case I can doubleclick on this log file and it would open. However, then I right-click on Notepad.exe, I do not see "Always run as an administrator". How can I get that in the context menu?

    Hans L
     
    Hans L, Jul 13, 2018
    #3
  4. Hans L

    TrainableMan ^ The World's First ^ Moderator

    Joined:
    May 10, 2010
    Messages:
    9,250
    Likes Received:
    1,599
    Location:
    PA, USA
    The best option I can offer is a "send to" shortcut.

    Open Windows Explorer (not Internet Explorer).
    In the folder bar type shell:sendto & press <enter>
    It should take you to C:\Users\<YourUserid>\AppData\Roaming\Microsoft\Windows\SendTo .
    Right-click on a blank spot in the right window pane & choose New > Shortcut
    Click Browse & find C:\Windows\notepad.exe then click "OK" & "Next"
    Name the shortcut AdminNotepad & hit "Finish"
    Then right-click on the new shortcut & choose "Properties"
    Under the shortcut tab click "Advanced"
    check the box "run as administrator" then click "OK" & "OK" again.

    To use your new shortcut go to the logs folder & right-click on CBS.log & choose Send To>AdminNotepad
     
    TrainableMan, Jul 17, 2018
    #4
  5. Hans L

    Hans L

    Joined:
    Jan 3, 2010
    Messages:
    101
    Likes Received:
    2
    Thanks, TrainableMan. I will try it.

    Hans L
     
    Hans L, Jul 17, 2018
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.