Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- param([switch] $Downgrade=$false)
- $Profile = "$env:USERPROFILE\Documents\Rockstar Games\GTA V"
- $Game = "D:\Steam\steamapps\common\Grand Theft Auto V"
- $SocialClub = "C:\Program Files\Rockstar Games\Social Club"
- if (!(Test-Path -Path $Profile)) {
- exit
- }
- if ($Downgrade) {
- $ProfileSource = "$Profile\versions\1.27"
- $ProfileDest = "$Profile\versions\latest"
- $GameVersion = "$Game\versions\1.27"
- $SocialClubInstaller = "$Game\versions\Social-Club-v1.1.7.8-Setup.exe"
- } else {
- $ProfileSource = "$Profile\versions\latest"
- $ProfileDest = "$Profile\versions\1.27"
- $GameVersion = "$Game\versions\latest"
- $SocialClubInstaller = "$Game\Installers\Social-Club-Setup.exe"
- }
- if ((Test-Path -Path $Profile\Profiles) -and !(Test-Path -Path $ProfileDest\Profiles)) {
- Move-Item -Path $Profile\Profiles -Destination $ProfileDest\Profiles
- }
- if (!(Test-Path -Path $Profile\Profiles)) {
- Move-Item -Path $ProfileSource\Profiles -Destination $Profile\Profiles
- }
- if ((Test-Path -Path $Profile\settings.xml) -and !(Test-Path -Path $ProfileDest\settings.xml)) {
- Move-Item -Path $Profile\settings.xml -Destination $ProfileDest\settings.xml
- }
- if (!(Test-Path -Path $Profile\settings.xml)) {
- Move-Item -Path $ProfileSource\settings.xml -Destination $Profile\settings.xml
- }
- Get-ChildItem $GameVersion | Copy -Destination $Game -Recurse -Force
- if (Test-Path -Path $SocialClub) {
- Start-Process -FilePath $SocialClub\uninstallRGSCRedistributable.exe -Wait
- }
- if (!(Test-Path -Path $SocialClub)) {
- Start-Process -FilePath $SocialClubInstaller -Wait
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement