privileges - Open files via an elevated context menu program

06
2014-04
  • AperiV

    So I've created in context menu an "open with Ollydbg" option.How can I run olly as an administrator from that point on?What command or arguments should I use?I run into a "ShellExecuteEx" command but still no luck

  • Answers
  • gronostaj
    1. Open Olly executable's properties.
    2. Click the Compatibility tab.
    3. Check Run this program as an administrator.

    ShellExecuteEx is an API function, not a command. You could use it if you were developing an application to run other EXEs with elevated privileges.

    If you want to run any program with elevated privileges from a command line, create a sudo.cmd file in any directory in your PATH:

    @echo Set objShell = CreateObject("Shell.Application") > %temp%\sudo.tmp.vbs
    @echo args = Right("%*", (Len("%*") - Len("%1"))) >> %temp%\sudo.tmp.vbs
    @echo objShell.ShellExecute "%1", args, "", "runas" >> %temp%\sudo.tmp.vbs
    @cscript %temp%\sudo.tmp.vbs
    

    Then type for example sudo notepad C:\example.txt to open C:\example.txt in elevated Notepad. (original source)


  • Related Question

    I lost the menu inside of Explorer (file browser) under Windows XP
  • jfmessier

    The question says it all. Inside of the file explorer under Windows XP, I lost all menu items from the top, as well as the toolbars. And right-clicking only gives me the file/directory context menu, nothing to restore the toolbar or the menu. Help. I don't use Windows so much (I much prefer linux), so I don't know all the latest tricks and hacks.

    Merci :-)


  • Related Answers
  • Robert Williams

    The following site has several tips to try in order to find the menu bar:

    http://www.tomshardware.com/forum/117914-45-windows-explorer-toolbar-missing

  • Bakhtiyor

    Try this
    Start | Run | Type: gpedit.msc | Click OK |
    Navigate to >>> User Configuration\Administrative Templates\Windows Components\ Windows Explorer\
    Find section called "Remove File menu from Windows Explorer"
    Set to: Not configured

  • JeffJak

    From Robert William's answer. This is what worked for me:

    In Full Screen (F11) the Menu Bar, the Address Bar and Links can be added. You can also right click the Toolbar and select Menu Bar.