Run as SYSTEM/TrustedInstaller?

Discussion in 'Windows 10' started by v72dd, Feb 4, 2017.

  1. v72dd

    v72dd MDL Senior Member

    Nov 20, 2016
    445
    77
    10
    Is there any command line tool that would allow this? :rolleyes:

    Something like psexec but this only runs as SYSTEM and it's quite complex.
     
  2. v72dd

    v72dd MDL Senior Member

    Nov 20, 2016
    445
    77
    10
    PowerRun doesn't work says it needs some service.
     
  3. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    The only issue with NSudo is that is does NOT work correctly on Server 2012 R2.
    It runs, but whatever is run, the session is not accessible from current logon

    sebus
     
  4. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    Was working a lot with nsudo lately, very handy little tool :good3:.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,215
    84,880
    340
    What session? you mean cmd windows?
     
  6. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,984
    1,331
    120

    I use it on any server w/o any problem.

    Not sure if I got what is your problem but seem obvious that being a different user not everything is straightforward, say you can't copy and paste from a program launched from nsudo and another launched from the current user.
     
  7. sebus

    sebus MDL Guru

    Jul 23, 2008
    6,356
    2,026
    210
    Lets say I invoke just cmd as TI

    cmd does indeed gets loaded as TI in a session that I have no access to, from currently logged user (actual administrator or admin user)

    so cmd is there, but I do NOT see it/are able to interact with it
     
  8. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,584
    5,362
    210
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Krakatoa

    Krakatoa MDL Addicted

    Feb 22, 2011
    667
    1,085
    30
    lobo11:
    it works
    it is free web
    try again soon
     
  10. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,984
    1,331
    120
    #14 T-S, Feb 4, 2017
    Last edited by a moderator: Apr 20, 2017
    Try this batch, which is what I use (made by abbodi and slightly modified by me)

    Code:
    @echo off
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    if "%errorlevel%" NEQ "0" (
        echo: Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
        echo: UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
        "%temp%\getadmin.vbs" &    exit
     )
    if exist "%temp%\getadmin.vbs" del /f /q "%temp%\getadmin.vbs"
    )
    
    cd /d "%~dp0"
    bin\NSudoC.exe -U:T -P:E "cmd /K cd /d %~dp0"
    Keep in mind that this assumes the nsudo executable is in a subfolder called bin, otherwise change the last line accordingly.
     
  11. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,584
    5,362
    210
    This site can’t be reached

    krakatoa.www3.cz took too long to respond.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. Nucleus

    Nucleus MDL Guru

    Aug 4, 2009
    2,868
    2,950
    90
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,584
    5,362
    210
    #17 lobo11, Feb 4, 2017
    Last edited: Feb 4, 2017
    Mine says:

    Allow Chrome to access the network in your firewall or antivirus settings.
    If it is already listed as a program allowed to access the network, try removing it from the list and adding it again.

    with google browser, let me reboot
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. v72dd

    v72dd MDL Senior Member

    Nov 20, 2016
    445
    77
    10
    #18 v72dd, Feb 4, 2017
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Where did you get NSudoC?
     
  15. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,584
    5,362
    210
    In FireFox browser:

    The connection has timed out

    The server at krakatoa.www3.cz is taking too long to respond.

    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer’s network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,273
    94,758
    450
    #20 Enthousiast, Feb 4, 2017
    Last edited: Feb 4, 2017