jschicht / runasti Goto Github PK
View Code? Open in Web Editor NEWLaunch processes with TrustedInstaller privilege
License: MIT License
Launch processes with TrustedInstaller privilege
License: MIT License
When running RunAsTI64.exe it does open a new cmd shell. testing with "whoami /groups" i can see, i got membership in "NT SERVICE\TrustedInstaller". In that shell i can run stuff as needed, but command line parameters passed to RunAsTI64.exe apparently are ignored.
What i would like to run is e.g. :
RunAsTI64.exe myBinary.exe arg1 arg2 arg3
What I see when attempting to run from administrative command prompt:
C:\Users\Administrator\Desktop>RunAsTI64.exe
AdjustTokenPrivileges for SeImpersonateName: Not all privileges or groups refere
nced are assigned to the caller.
LsaAddAccountRights 0x00000521
Warning: The right was probably not added correctly to your account
Running in session: 1
Success CreateProcessWithTokenW created new process: 3680
C:\Users\Administrator\Desktop>RunAsTI.exe
AdjustTokenPrivileges for SeImpersonateName: Not all privileges or groups refere
nced are assigned to the caller.
LsaAddAccountRights 0x00000521
Warning: The right was probably not added correctly to your account
Running in session: 1
Success CreateProcessWithTokenW created new process: 3912
I am currently trying to run a powershell script with RunAsTI64.exe from a batch file that way it can be semi automatic. The only way I have found to run a powershell script with RunAsTi64.exe is to do .\RunAsTI64.exe Powershell.exe then call the powershell script within that powershell session.
Is there anyway I can either pass the script to the Powershell session with something like .\RunAsTI64.exe Powershell.exe "PathtoScript\Script.ps1"
Or can I just run the script using RunAsTI64.exe with something like this
.\RunAsTI64.exe "PathtoScript\Script.ps1"
When executing under normal CMD, elevated CMD and even system CMD (tried all 3) RunAsTI64 gives the following message:
C:\Users>RunAsTI64 /?
This version of c:\bin\RunAsTI64.exe is not compatible with the version of Windo
ws you're running. Check your computer's system information to see whether you n
eed a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the
software publisher.
More info:
C:\Users>ver
Microsoft Windows [Version 6.1.7601]
Tried downloading it again, have not tried running interpreted code...
>"C:\Program Files (x86)\AutoIt3\SciTE\..\au3check.exe" -q "C:\Users\Jeffery\Documents\GitHub\RunAsTI\RunAsTI.au3"
"C:\Users\Jeffery\Documents\GitHub\RunAsTI\RunAsTI.au3"(20,49) : error: $NORMAL_PRIORITY_CLASS previously declared as a 'Const'.
Global Const $NORMAL_PRIORITY_CLASS = 0x00000020
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Jeffery\Documents\GitHub\RunAsTI\RunAsTI.au3"(21,46) : error: $CREATE_NEW_CONSOLE previously declared as a 'Const'.
Global Const $CREATE_NEW_CONSOLE = 0x00000010
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Jeffery\Documents\GitHub\RunAsTI\RunAsTI.au3"(22,54) : error: $CREATE_UNICODE_ENVIRONMENT previously declared as a 'Const'.
Global Const $CREATE_UNICODE_ENVIRONMENT = 0x00000400
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Jeffery\Documents\GitHub\RunAsTI\RunAsTI.au3 - 3 error(s), 0 warning(s)
>Exit code: 2 Time: 0.2913
From what I can see, your project doesn't include a license, and what that means is that no one can use it, as standard copyright laws apply.
If this is not what you intended, might I recommend the Eclipse Public License?
Also, where did you find a license for RunAsSystem and/or RunFromToken that allow you to distribute them in your program (the compiled exes)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.