Update Among Us - TOHE.ps1

This commit is contained in:
2024-10-07 14:48:16 +00:00
parent b750053883
commit b54278bdb4

View File

@@ -1,11 +1,5 @@
# To run this easily, hit the "Windows Key" + "R" and paste the following command in the window that pops up. Do not include the # at the start:
# 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"
$gameName = "Among Us"
$registryPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
# Search for the game in the registry
$gameKey = Get-ChildItem $registryPath | Where-Object {(Get-ItemProperty $_.PSPath).DisplayName -like "*$gameName*"}
$GamePath = (Get-ItemProperty $gameKey.PSPath).InstallLocation
if ($GamePath)
@@ -21,8 +15,4 @@ if ($GamePath)
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
}
else
{
Write-Output "Cannot autodetect the game's install location. Please manually install the mods."
}