From ba86deb676e5e461916d8762440254d7eb6335ce Mon Sep 17 00:00:00 2001 From: Michael Resta Date: Mon, 7 Oct 2024 19:28:27 +0000 Subject: [PATCH] Update Among Us - TOHE.ps1 --- Among Us - TOHE.ps1 | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/Among Us - TOHE.ps1 b/Among Us - TOHE.ps1 index d11f808..a3b9c57 100644 --- a/Among Us - TOHE.ps1 +++ b/Among Us - TOHE.ps1 @@ -1,22 +1,4 @@ -Test-Connection "www.google.com" -Count 1 -#To Run this easily. Run the following command: +#To Run this easily. Run the following command: # Powershell $A = (curl https://gitea.resta.us/resta.us/public/raw/branch/main/Among%20Us%20-%20TOHE.ps1).content; Invoke-Expression $A -$gameName = "Among Us" -$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" -$gameKey = Get-ChildItem $registryPath | Where-Object {(Get-ItemProperty $_.PSPath).DisplayName -like "*$gameName*"} -$GamePath = (Get-ItemProperty $gameKey.PSPath).InstallLocation -if ($GamePath) - { - $ModURL = "https://github.com/EnhancedNetwork/TownofHost-Enhanced/releases/download/v2.0.3/TOH-Enhanced.2.0.3.zip" - $Temp = "C:\Temp\Among Us" - $installPath = $GamePath -replace ".{9}$" - Remove-Item "$installPath\TOHE" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item "C:\Users\$env:Username\Desktop\Among Us - TOHE" -Recurse -Force -ErrorAction SilentlyContinue - New-Item $Temp -ItemType Directory -Force -ErrorAction SilentlyContinue - Curl -Uri $ModURL -OutFile "$Temp\File.zip" - Copy-Item -Path "$installPath\$gameName" -Destination "$installPath\TOHE" -Recurse - Expand-Archive "$Temp\File.zip" -DestinationPath "$installPath\TOHE" - New-Item -ItemType SymbolicLink -Path "C:\Users\$env:Username\Desktop" -Name "Among Us - TOHE" -Value "$installPath\TOHE\Among Us.exe" - Remove-Item "$Temp" -Recurse - } \ No newline at end of file +$gameName = "Among Us";$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";$gameKey = Get-ChildItem $registryPath | Where-Object {(Get-ItemProperty $_.PSPath).DisplayName -like "*$gameName*"};$GamePath = (Get-ItemProperty $gameKey.PSPath).InstallLocation;if ($GamePath){$ModURL = "https://github.com/EnhancedNetwork/TownofHost-Enhanced/releases/download/v2.0.3/TOH-Enhanced.2.0.3.zip";$Temp = "C:\Temp\Among Us";$installPath = $GamePath -replace ".{9}$";Remove-Item "$installPath\TOHE" -Recurse -Force -ErrorAction SilentlyContinue;Remove-Item "C:\Users\$env:Username\Desktop\Among Us - TOHE" -Recurse -Force -ErrorAction SilentlyContinue;New-Item $Temp -ItemType Directory -Force -ErrorAction SilentlyContinue;Curl -Uri $ModURL -OutFile "$Temp\File.zip";Copy-Item -Path "$installPath\$gameName" -Destination "$installPath\TOHE" -Recurse;Expand-Archive "$Temp\File.zip" -DestinationPath "$installPath\TOHE";New-Item -ItemType SymbolicLink -Path "C:\Users\$env:Username\Desktop" -Name "Among Us - TOHE" -Value "$installPath\TOHE\Among Us.exe";Remove-Item "$Temp" -Recurse} \ No newline at end of file