Menu

Console + Console (as Administrator)

2010-07-22
2013-06-12
  • matthew sheeran

    matthew sheeran - 2010-07-22

    I think in the help it was noted that UAC Elevation and run as… were not implemented yet.
    For those in the know, and as a possible complete future answer, as switching to super user should be a rare event (under Windows anyway) I did the following:
    Copy "Console.exe" to "Console (as Administrator).exe" in the same directory and then on the latter or from your Shortcut to the latter set the Run as Administrator option.
    And wallah we have two Console containers: one elevated and one not!
    Hope this Appy proves useful - takes a little while to get used to but - I am adding all my: cmd, IPython, python, irb etc shells into it and save valuable menu real estate and time!

    For a easy future build do the same and just add the "UAC Elevation" syscall to Appy #2. ;-) Forget about doing it dynamically on demand as I both dont see the point and it will inevitabley prove to be another attack vector security risk somehow - trust me.  (And for example deleting files accidentally you expected to be protected from UAC etc etc…)

    That is why i prefer this duel exe model and solution.

    BTW: I just tested both Appy's running together and they seem to play nice… so far…

    Regards and all the best team!

     
  • matthew sheeran

    matthew sheeran - 2010-07-23

    Works so far…
    As the app appears to read the CML config file upon start and rewrite (in its entirity) on change then this would only prove problematic IFF (If and only IF) you attempt to simultaneously change and therefore rewrite the Console.XML file in both of the, or two, running instances at the same time.
    All that is required then is a double build to the new filename "Console (as Administrator).exe" with say 'UAC" defined and the following pseudo code:

    #ifdef UAC

    doUAC();  #insert somewhere in the code

    function doUAC()
    {
      if Windows Version >= Vista then
    {
      do UAC syscall();
    }
    }
    #endif

    If I get a chance - and no objections - I might check it out and add this myself.
    Matthew.

     

Log in to post a comment.