From bf81c45c4c86c6309017daba87f29105e680e448 Mon Sep 17 00:00:00 2001 From: SuperPotato27 Date: Wed, 31 Jul 2024 17:21:42 -0400 Subject: [PATCH] Added a desktop shortcut and updated paths --- package/win/tcg-rim-tool/InstallTools.bat | 2 ++ package/win/tcg-rim-tool/README.md | 6 ++++-- .../tcg-rim-tool/create_hirstools_desktop_shortcut.ps1 | 9 +++++++++ package/win/tcg-rim-tool/hirsshell.ps1 | 7 ------- package/win/tcg-rim-tool/runTools.bat | 3 +-- 5 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 package/win/tcg-rim-tool/InstallTools.bat create mode 100644 package/win/tcg-rim-tool/create_hirstools_desktop_shortcut.ps1 diff --git a/package/win/tcg-rim-tool/InstallTools.bat b/package/win/tcg-rim-tool/InstallTools.bat new file mode 100644 index 00000000..01800288 --- /dev/null +++ b/package/win/tcg-rim-tool/InstallTools.bat @@ -0,0 +1,2 @@ +@echo off +powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0\create_hirstools_desktop_shortcut.ps1" diff --git a/package/win/tcg-rim-tool/README.md b/package/win/tcg-rim-tool/README.md index 349e21e4..97047fcb 100644 --- a/package/win/tcg-rim-tool/README.md +++ b/package/win/tcg-rim-tool/README.md @@ -4,9 +4,11 @@ To get the tools running on windows follow the instructions below: 1- Unzip "ZIP_Files" -2- Double click runTools.bat, a HIRS terminal should open. +2- Run the install file under ```hirstools\IntsallTools.bat``` a HIRS_tools shortcut should appear on your desktop -To run the rim tool try the following commands +3- Double click HIRS_tools.lnk shortcut and HIRS terminal should open. + +To run the rim tool try the following commands: > rim -c base -a .\tcg_rim_tool\Base_Rim_Config.json -l .\tcg_rim_tool\TpmLog.bin -k .\tcg_rim_tool\PC_OEM1_rim_signer_rsa_3k_sha384.key -p .\tcg_rim_tool\PC_OEM1_rim_signer_rsa_3k_sha384.pem -o baseRim.swidtag diff --git a/package/win/tcg-rim-tool/create_hirstools_desktop_shortcut.ps1 b/package/win/tcg-rim-tool/create_hirstools_desktop_shortcut.ps1 new file mode 100644 index 00000000..e0275fd1 --- /dev/null +++ b/package/win/tcg-rim-tool/create_hirstools_desktop_shortcut.ps1 @@ -0,0 +1,9 @@ +# Unzip tools in the working directory +Expand-Archive -Path ..\tcg_rim_tool.zip -DestinationPath .\tcg_rim_tool +Expand-Archive -Path ..\tcg_eventlog_tool.zip -DestinationPath .\tcg_eventlog_tool +# Create a shortcut to start the RIM shell +$WshShell = New-Object -comObject WScript.Shell +$Shortcut = $WshShell.CreateShortcut("$Home\Desktop\HIRS_tools.lnk") +$Shortcut.TargetPath = "$PWD\RunTools.bat" +$Shortcut.WorkingDirectory = "$PWD" +$Shortcut.Save() diff --git a/package/win/tcg-rim-tool/hirsshell.ps1 b/package/win/tcg-rim-tool/hirsshell.ps1 index b87b45d7..3df0d501 100644 --- a/package/win/tcg-rim-tool/hirsshell.ps1 +++ b/package/win/tcg-rim-tool/hirsshell.ps1 @@ -1,10 +1,3 @@ -# Unzip tools in the working directory -if (Test-Path ".\tcg_rim_tool") { - Write-Output "tcg_rim_tool already unzipped" -} else { - Expand-Archive -Path .\tcg_rim_tool.zip -DestinationPath .\tcg_rim_tool - Expand-Archive -Path .\tcg_eventlog_tool.zip -DestinationPath .\tcg_eventlog_tool -} # Script to start a new shell with a rim alias $StartInfo = new-object System.Diagnostics.ProcessStartInfo $StartInfo.FileName = "$pshome\powershell.exe" diff --git a/package/win/tcg-rim-tool/runTools.bat b/package/win/tcg-rim-tool/runTools.bat index 55f9212a..bd574cef 100644 --- a/package/win/tcg-rim-tool/runTools.bat +++ b/package/win/tcg-rim-tool/runTools.bat @@ -1,3 +1,2 @@ @echo off -powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0hirsshell.ps1" -pause \ No newline at end of file +powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0\hirsshell.ps1"