Results 1 to 4 of 4

Thread: [RESOLVED] ShellLExec a program with normal privileges ?

  1. #1

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,663

    Resolved [RESOLVED] ShellLExec a program with normal privileges ?

    Hello,

    I have a program which runs elevated as an Admin. Now this needs to shell another program, but it's doing that elevated too, since its own process runs elevated!

    How do you shell so that the shelled program runs normally with its own manifest ?
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: ShellLExec a program with normal privileges ?

    This is an unusual requirement and there isn't any clear-cut way to do it.

    See Launch a Process as Standard User from an Elevated Process for one discussion of the issues involved. It gets complicated, because even with UAC users should not be logging in as members of the Administrators group. Pay attention to OTS Elevation, since that's what should be used instead and will be except on casual home users' systems where desperately trying to pretend we still live in a Win9x world is common.

  3. #3

    Thread Starter
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,663

    Re: ShellLExec a program with normal privileges ?

    Quote Originally Posted by dilettante View Post
    This is an unusual requirement and there isn't any clear-cut way to do it.
    C++ :/

    Then again, is it worth the hassle?

    Enable the SeIncreaseQuotaPrivilege in your current token (sample)
    Get an HWND representing the desktop shell (GetShellWindow)
    Get the Process ID (PID) of the process associated with that window (GetWindowThreadProcessId)
    Open that process (OpenProcess)
    Get the access token from that process (OpenProcessToken)
    Make a primary token with that token (DuplicateTokenEx)
    Start the new process with that primary token (CreateProcessWithTokenW)


    Perhaps if I find a solution to this Get WinKey without Admin Rights ? then I won't need any of this ?

    EDIT:
    Just found a solution which means yes I don't need the hassle of user rights
    Last edited by some1uk03; Jun 15th, 2014 at 12:28 PM.
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  4. #4
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,053

    Re: [RESOLVED] ShellLExec a program with normal privileges ?

    [...]
    Last edited by dz32; Apr 26th, 2019 at 11:29 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width