diff --git a/TI-CMD.bat b/TI-CMD.bat index 61982c0..671bd0f 100644 --- a/TI-CMD.bat +++ b/TI-CMD.bat @@ -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"