Update TI-CMD.bat

This commit is contained in:
Arma-Damna-Dillo 2025-02-13 22:15:04 +00:00
parent 0e2454e437
commit 26a112e021

View file

@ -1,10 +1,31 @@
@echo off
:: Info and 1337 ha0xr colors
title TrustedInstaller CMD
color 0a
echo "TrustedInstaller CMD is made by Sneed Group."
echo TrustedInstaller CMD is made by Sneed Group.
echo "Output stored at C:\ticmd-out.txt"
:A
:: Allow user input
set /p bp="TI:\> "
:: For sanity: Stop TrustedInstaller service before modifying it
sc.exe stop TrustedInstaller
sc.exe config TrustedInstaller binpath= "cmd /c %bp%"
:: Run user input as TrustedInstaller, output to plaintext file
sc.exe config TrustedInstaller binpath= "cmd /c %bp% >> C:\ticmd-out.txt"
:: Start TrustedInstaller with new configuration
sc.exe start TrustedInstaller
:: Stop to reconfigure to defaults
sc.exe stop TrustedInstaller
sc.exe config TrustedInstaller binpath= "%windir%\servicing\TrustedInstaller.exe"
:: Restart loop
goto A
:: In case the user somehow exits the loop, reset the TrustedInstaller service back to default
sc.exe stop TrustedInstaller
sc.exe config TrustedInstaller binpath= "%windir%\servicing\TrustedInstaller.exe"