Avoid UAC prompts by using an elevated program launcher

Discussion in 'other security issues & news' started by MrBrian, May 30, 2010.

Thread Status:
Not open for further replies.
  1. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    This thread presents a method for avoiding UAC prompts that I'll refer to as the "elevated program launcher method." This method works in either an admin account or a standard account. The underlying basis of this method is the fact that any program running elevated can launch another program elevated without a UAC prompt, provided that there isn't another instance of the program to be launched already running non-elevated. Thus, an elevated program launcher - such as ObjectDock, Launchy, Folder Menu, etc. - will launch any program without a UAC prompt, provided that there isn't another instance of the program to be launched already running non-elevated.

    As an example, suppose that you would like to run a backup program elevated without a UAC prompt. On first use, configure the program launcher to list the backup program as an option. Then invoke the backup program from the elevated program launcher. The backup program is launched elevated without a UAC prompt :).

    For convenience, you probably will want to run the program launcher elevated every time that you log into your account.
    a) If the account is an admin account, schedule the program launcher to run at login as described at http://blogs.tcom.com/window-on-windows/?p=616.
    b) If the account is a standard account, use RunasSpc or a similar program to launch the program launcher with admin credentials from the standard user's Startup folder.
    Here are detailed instructions for doing this with RunasSpc:
    1. Log into standard account and download RunasSpc.
    2. Log into the admin account in which you want to run the program launcher elevated when in the standard account.
    3. In Windows Explorer, right-click on the program launcher's .exe, right-click Properties, go to Compatibility tab, and check "Run this program as an administrator."
    4. Unzip RunasSpc and move the unzipped RunasSpc folder to its desired permanent location, such as within Program Files.
    5. Run runasspcadmin.exe. Provide credentials for the admin account in the Username and Password fields. In the 'Path\Application.exe' field, provide the path to the program launcher that you're using. Click command 'Save Cryptfile'. Click 'Test Cryptfile' if you want to test that the program launcher is launched elevated. Exit runasspcadmin. Move the saved .spc file to the desired location, perhaps to the same folder where the program launcher is located.
    6. Log into standard account.
    7. In Windows Explorer, go to the folder where the standard user's Startup folder is located. You can find this folder by right-clicking on Startup in the start menu and then choosing Properties. Right-click and choose New->Shortcut. In the Target field, enter "path of runasspc.exe" "path of cryptfile generated in step 5" /quiet.
    8. Test by logging out and then back into the standard account. You should get a UAC prompt for the launching of the program launcher, but no credentials will be asked for. The program launcher should now be running elevated.

    I've tested this method with the program launcher Folder Menu, but other program launchers can probably also be used.

    Related thread: How to avoid typing UAC (User Account Control) credentials for selected programs (mentions several methods, including this one).
    Alternate method: SuRun. See also SuRun - SUDO in Windows - Tutorial.
    Alternate method: Norton UAC Tool (Vista only).
     
    Last edited: May 30, 2010
  2. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
  3. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    Elevated program launcher method vs SuRun:
    • Elevated program launcher method requires use of a separate program launcher for programs that are to be launched as admin. SuRun doesn't.
    • Programs elevated with SuRun run under the standard user's account. Programs elevated with elevated program launcher method run under a separate admin account, the same as when elevating with a UAC prompt.
    • SuRun integrates more heavily into your system than elevated program launcher method.
    • Since SuRun has the option to add an option to 'Start as administrator' to context menus, SuRun may be more convenient for some.
    • Elevated program launcher method is IMHO easier to understand.
    • SuRun has an option to allow the user to run only certain programs elevated. Elevated program launcher method doesn't.
    • Any program set to start automatically with SuRun will start automatically when started in any manner, including if malware starts it. Elevated program launcher method launches a program elevated only when launched via the program launcher.

    Those who know more about SuRun than I do maybe can list some more differences between the two methods.
     
  4. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    Since a picture can be better than words, I've posted a screenshot of part of the desktop of my limited user account. The screenshot shows the menu that appears when the Folder Menu tray icon (leftmost icon) is clicked. When any of the programs in the menu are clicked, the program launches as admin with no UAC prompt :).
     

    Attached Files:

  5. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    Tip: to install programs from a standard account, include in your program launcher list a third-party file manager such as Q-Dir. Run the installer from the elevated file manager.
     
  6. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    I was unable to elevate Folder Menu in a second session when it was already elevated in another session, although I was using different folders for each instance of Folder Menu. Solution: make sure that the Folder Menu executables have different names from one another.
     
  7. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
  8. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    From http://msinfluentials.com/blogs/jes...-about-vista-features-what-uac-really-is.aspx:
    When using the elevated program launcher method, you are using the "Better" way, not the "Best" way, as far as security is concerned.

    From http://theinvisiblethings.blogspot.com/2007/02/running-vista-every-day.html:
    I still use the "Best" way as much as possible, reserving the use of elevated programs in a standard account for situations where it's too inconvenient to switch to an admin account. I never run Windows features, such as the command prompt, elevated in a standard user account, due to concerns mentioned in the last quote.
     
  9. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    Start Menu 7 is free program launcher that uses your existing Start menu shortcuts. Turn off the option to replace the Start menu, and launch elevated programs from the tray icon :).
     
    Last edited: Jun 8, 2010
  10. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
    Last edited: Sep 15, 2010
  11. MrBrian

    MrBrian Registered Member

    Joined:
    Feb 24, 2008
    Posts:
    6,032
    Location:
    USA
Loading...
Thread Status:
Not open for further replies.