![]() |
Run as Trusted Installer context menu
1 Attachment(s)
This a a context menu extension for MS-Windows which allows you to run any program as the "Trusted Installer" with more privileges than the Administrator or System.
You can use it to run Windows Explorer or `regedit.exe` ...or any other program. INSTALLATION: Run the attached install.bat file ... or copy the `RunAsTI.exe` to your `Windows\System32` directory and merge the `RunAsTI.reg` file into the Windows Registry. BUILD: Open the `RunAsTI.sln` file in Visual Studio 2019, right-click on the Solution 'RunAsTI' in the Solution Explorer and select "Build Solution". A new `RunAsTI.exe` will be generated in the `x64\Release\` or `x64\Debug\` directory. TO USE: Right-click on any program in Windows Explorer and select "Run as Trusted Installer". You must be the Administrator in order to become the Trusted Installer. You can see how it looks like on the following screenshot: https://imgur.com/a/xOOO63t Full source and the compiled .exe file are attached and at the link below: https://gofile.io/d/QK20BZ |
thanks for share, the link is down (https://file.io/X2yKt7tgv93x)
|
@HarrySpoofer
thanks for nice piece of work! If you don't mind I"d provide some small feedback: 1) I'd do case insensitive comparison inside the GetProcessIdByName() routine -> if (pe.szExeFile == processName) 2) compiler is unhappy on setting signed int to unsided dword; warning C4245: 'initializing': conversion from 'int' to 'DWORD', signed/unsigned mismatch do you know if Windows has got some define for wrong pid values? eg smth like INVALID_HANDLE_VALUE 3) be honest, did you leave an Easter Egg in one routine? :) kudos! |
The code is pretty much identical to the https://github.com/lilkui/runasti repository.
The only difference is that somebody refactored everything to camel case (e.g. "get_process_id_by_name(const string process_name)" becomes "GetProcessIdByName(wstring processName)"). The code in the repository already has some of the bugs fixed! |
what about these https://mega.nz/file/S0h30aTa#ca0vJpwlP5qQZmyOcMmhiPrHEkZIpTdrlgmtPpZd4JQ ?
|
I"m having "NT AUTHORITY\SYSTEM"
instead of "Trusted Installer" https://prnt.sc/7fjfqwv-P5GQ is that expected? |
Quote:
I made the changes you suggested and updated the attachment and the link. BTW: I did not put an Easter egg in it, I added new icons, though. |
That is correct.
to verify that you have the `Trusted Installer` privileges, execute this at the command line: Code:
whoami /groupsOn my system the output looks like this: Code:
C:\Profiles\Admin>whoami /groupsQuote:
|
Quote:
I was under impression this line is it - >> wctomb_s(&mbCharLen, &buff[0], 42, wc); |
one more question:
it is really require d to enable this priv lvl? >EnablePrivilege(SE_DEBUG_NAME); |
one more feedback:
is it OK to delegate memory zero-ing to compiler? eg instead of calling WinAPI ZeroMemory() just do STARTUPINFOW startupInfo = { 0 }; |
Quote:
Quote:
Quote:
|
I"ve ran the PVS Tool against the tool,
I"d like to note -very well done! some minor suggestions: https://prnt.sc/vQpQVeHUiyV0 eg: DWORD GetProcessIdByName(wstring processName) -> DWORD GetProcessIdByName(const wstring& processName) and similar ones 2) there are some potential set of handle leaks (not closed) 3) I've commented out this enablement: //EnablePrivilege(SE_DEBUG_NAME); and the tool still works?! 4) imagine that some end user is having localized Windows OS, eg chinese or japanese or some arabic, etc how about supporting these users as well? IMHO in this case the routine std::string GetLastErrorAsString() need to be unicode (wide string) aware |
Quote:
|
what is the issue you are observing?
I"ve tested the tool on both Win7 & Win11 (24H2), no issues seen so far so good. https://ibb.co/w6MdnDt my updates are included over here https://workupload.com/file/dyMPqZYgZqM fixed handles leak, introduced one macro that simplifies reading of the code (IMHO) :) PS the only thing left that I thinking about - support of std::wstring for exceptions throwing, but it turned out std::exception does not like wstring, so not that easy |
| All times are GMT +8. The time now is 22:42. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX