Switch to non-elevated program from elevated prompt


  1. Posts : 11
    Win10
       #1

    Switch to non-elevated program from elevated prompt


    Hi,

    I use an administrative mode (elevated) command prompt to maneuver through most of my day. I have a code editor (in this case, Crimson Editor) open at all times, and when I need to edit a file quickly, I simply type
    cedt <filename>
    at the command prompt.

    What is happening in Win10 - which is different behavior from Win7 - is... nothing! Crimson Editor was started from the Startup folder as non-elevated, and so when I type that command in the administrative prompt, focus changes to Crimson Editor, but the requested file is not loaded!

    If I open a regular cmd prompt and try the above command, it runs as expected, and as it did in administrator mode in Win7. Is there some setting I can add/change to make this work?

    I also note that Win10 does not start programs from the startup folder if they have been set (in Properties) to run as Administrator, so starting Crimson Editor by hand at every reboot is possible but annoying. Thanks!
      My Computer


  2. Posts : 92
    Windows 10
       #2

    cniggeler said:
    I also note that Win10 does not start programs from the startup folder if they have been set (in Properties) to run as Administrator, so starting Crimson Editor by hand at every reboot is possible but annoying. Thanks!
    That sounds like a UAC issue rather than a Windows 10 problem, did you have UAC disabled in Windows 7 by any chance? In any case, you can use task scheduler as a workaround for starting programs with administrative privileges at boot, for example see the instructions here: http://www.peerblock.com/userguide/h...accountcontrol
      My Computer


  3. Posts : 68,842
    64-bit Windows 11 Pro for Workstations
       #3

    Hello cniggeler, and welcome to Ten Forums. :)

    If you like, you can use the same method in the tutorial below to create an elevated shortcut of the app that won't get a UAC prompt, and place that elevated shortcut in your Startup folder to have it run elevated at startup.

    Elevated Program Shortcut without UAC Prompt - Create - Windows 7 Help Forums
      My Computers


  4. Posts : 11
    Win10
    Thread Starter
       #4

    Thank you both for your replies. I will try out the Tutorial and link you each provided. I did not know how to run an elevated program from Startup before!
      My Computer


  5. Posts : 5,478
    2004
       #5

    You can also do it the other way around and start a program as your normal user from a elevated cmd prompt using the runas command.

    If you use the /savecred parameter you'll only be asked for your password once.

    For example with your forum name and notepad
    Code:
    C:\WINDOWS\system32>runas /user:cniggeler /savecred notepad
    or to open a certain file with your program (for example C:\Windows\WindowsUpdate.log)
    Code:
    C:\WINDOWS\system32>runas /user:cniggeler /savecred "notepad \C:\Windows\WindowsUpdate.log"
    Last edited by lx07; 19 Oct 2015 at 10:25. Reason: removed added link as it is other way around
      My Computer


  6. Posts : 11
    Win10
    Thread Starter
       #6

    halasz said:
    You can also do it the other way around and start a program as your normal user from a elevated cmd prompt using the runas command.
    I like this one too - thanks!
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 14:47.
Find Us




Windows 10 Forums