How to launch executable as different user?

Discussion in 'Windows 11' started by OpenSourceGhost, May 14, 2024.

  1. OpenSourceGhost

    OpenSourceGhost MDL Member

    Feb 14, 2022
    170
    24
    10
    I have a program that requires either:
    - Administrative privileges
    OR
    - User privileges if user is added to (or is already member of) "Network Configuration Operators" group

    Launching mentioned program with administrative privileges displays too much sensitive information on screen, but launching mentioned program as user (who is member of "Network Configuration Operators") hides sensitive information without limiting other functions of the mentioned program.

    There is only one user account on PC where user is administrator and user is already added as member of "Network Configuration Operators" group, but mentioned program defaults to using administrative privileges and displays too much sensitive information on screen. How to create a shortcut or a script that forces mentioned program to launch only as user (with "Network Configuration Operators" privileges) when user is administrator?

    I basically want to de-privilege user administrator account to "Network Configuration Operators" user privileges for this one specific application.
     
  2. pm67310

    pm67310 MDL Guru

    Sep 6, 2011
    3,350
    2,523
    120
    use standard account and launch with run as administrator ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,923
    150
    Add your user to the needed group

    or


    create a new user with the required privileges/group

    then

    use psexec / psexec64

    psexec64 -u USER -p PASSWORD program.exe

    or

    use secpol.msc to twak what a user / group can/cannot do.
     
  4. OpenSourceGhost

    OpenSourceGhost MDL Member

    Feb 14, 2022
    170
    24
    10
    ...

    I need to run that program NOT as admin, but as Network Configuration Operator while using user account where user is member of admin group and is member of Network Configuration Operators group.
     
  5. pm67310

    pm67310 MDL Guru

    Sep 6, 2011
    3,350
    2,523
    120
    create standard user and add this user to network group
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. OpenSourceGhost

    OpenSourceGhost MDL Member

    Feb 14, 2022
    170
    24
    10
    Wouldn't I have to switch between 2 accounts by logging in and out just to run that one application? Is there no "Run As 'Network Configuration Operator' " context menu tweak or something similar?
     
  7. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,923
    150
    Care to read what I already wrote?

    Use psexec
     
  8. acer-5100

    acer-5100 MDL Guru

    Dec 8, 2018
    4,003
    2,923
    150
    You mean the same USER works as a real login, but don't work trough psexec ?

    If so try to add -i or -i 1
     
  9. OpenSourceGhost

    OpenSourceGhost MDL Member

    Feb 14, 2022
    170
    24
    10
    Can't get it to work at all now. It just keeps saying that it requires Administrative privileges.