Update Among Us - TOHE.ps1
This commit is contained in:
@@ -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:
|
$gameName = "Among Us"
|
||||||
# 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"
|
$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*"}
|
$gameKey = Get-ChildItem $registryPath | Where-Object {(Get-ItemProperty $_.PSPath).DisplayName -like "*$gameName*"}
|
||||||
$GamePath = (Get-ItemProperty $gameKey.PSPath).InstallLocation
|
$GamePath = (Get-ItemProperty $gameKey.PSPath).InstallLocation
|
||||||
if ($GamePath)
|
if ($GamePath)
|
||||||
@@ -21,8 +15,4 @@ if ($GamePath)
|
|||||||
Expand-Archive "$Temp\File.zip" -DestinationPath "$installPath\TOHE"
|
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"
|
New-Item -ItemType SymbolicLink -Path "C:\Users\$env:Username\Desktop" -Name "Among Us - TOHE" -Value "$installPath\TOHE\Among Us.exe"
|
||||||
Remove-Item "$Temp" -Recurse
|
Remove-Item "$Temp" -Recurse
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Write-Output "Cannot autodetect the game's install location. Please manually install the mods."
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user