Files
public/Among Us - TOHE.ps1

24 lines
1.9 KiB
PowerShell

#To Run this easily, use one of the following methods:
#Method 1: Right click the start menu. Click "Terminal (Admin)" or "Windows Powershell (Admin)" and paste the following line in the command window:
# $A = (curl https://gitea.resta.us/resta.us/public/raw/branch/main/Among%20Us%20-%20TOHE.ps1).content; Invoke-Expression $A.Substring(1)
$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://objects.githubusercontent.com/github-production-release-asset-2e65be/701062524/7e45f73b-0991-478c-ace0-0876df5fe5b3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250622%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250622T191231Z&X-Amz-Expires=1800&X-Amz-Signature=de68fca86c5dde12c1a401e8ab896b36bace462ba49858b6a708e71ec438bf7c&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3DTOH-Enhanced-SteamEpic-2.2.1b3.zip&response-content-type=application%2Foctet-stream"
$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
}
pause