Run as SYSTEM/TrustedInstaller?

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

  1. testtest322

    testtest322 MDL Senior Member

    Nov 20, 2016
    393
    71
    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. testtest322

    testtest322 MDL Senior Member

    Nov 20, 2016
    393
    71
    10
    PowerRun doesn't work says it needs some service.
     
  3. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    8,100
    27,024
    270
  4. testtest322

    testtest322 MDL Senior Member

    Nov 20, 2016
    393
    71
    10
    Now we're talking haha :D
     
  5. sebus

    sebus MDL Guru

    Jul 23, 2008
    5,935
    1,803
    180
    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
     
  6. s1ave77

    s1ave77 MDL Guide Dog/Dev

    Aug 15, 2012
    15,358
    21,482
    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...
  7. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    8,100
    27,024
    270
    What session? you mean cmd windows?
     
  8. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,988
    1,318
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. sebus

    sebus MDL Guru

    Jul 23, 2008
    5,935
    1,803
    180
    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
     
  10. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,539
    4,989
    210
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Krakatoa

    Krakatoa MDL Senior Member

    Feb 22, 2011
    367
    386
    10
    lobo11:
    it works
    it is free web
    try again soon
     
  12. T-S

    T-S MDL Guru

    Dec 14, 2012
    3,988
    1,318
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,539
    4,989
    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...
  14. Nucleus

    Nucleus MDL Guru

    Aug 4, 2009
    2,873
    2,930
    90
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,539
    4,989
    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...
  16. testtest322

    testtest322 MDL Senior Member

    Nov 20, 2016
    393
    71
    10
    #18 testtest322, Feb 4, 2017
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Where did you get NSudoC?
     
  17. lobo11

    lobo11 TOMAHAWK CHOP

    Feb 16, 2012
    6,539
    4,989
    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...
  18. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    16,847
    21,191
    340
    #20 Enthousiast, Feb 4, 2017
    Last edited: Feb 4, 2017