Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. param([switch] $Downgrade=$false)
  2.  
  3. $Profile = "$env:USERPROFILE\Documents\Rockstar Games\GTA V"
  4. $Game = "D:\Steam\steamapps\common\Grand Theft Auto V"
  5. $SocialClub = "C:\Program Files\Rockstar Games\Social Club"
  6.  
  7. if (!(Test-Path -Path $Profile)) {
  8. exit
  9. }
  10.  
  11. if ($Downgrade) {
  12. $ProfileSource = "$Profile\versions\1.27"
  13. $ProfileDest = "$Profile\versions\latest"
  14. $GameVersion = "$Game\versions\1.27"
  15. $SocialClubInstaller = "$Game\versions\Social-Club-v1.1.7.8-Setup.exe"
  16. } else {
  17. $ProfileSource = "$Profile\versions\latest"
  18. $ProfileDest = "$Profile\versions\1.27"
  19. $GameVersion = "$Game\versions\latest"
  20. $SocialClubInstaller = "$Game\Installers\Social-Club-Setup.exe"
  21. }
  22.  
  23. if ((Test-Path -Path $Profile\Profiles) -and !(Test-Path -Path $ProfileDest\Profiles)) {
  24. Move-Item -Path $Profile\Profiles -Destination $ProfileDest\Profiles
  25. }
  26.  
  27. if (!(Test-Path -Path $Profile\Profiles)) {
  28. Move-Item -Path $ProfileSource\Profiles -Destination $Profile\Profiles
  29. }
  30.  
  31. if ((Test-Path -Path $Profile\settings.xml) -and !(Test-Path -Path $ProfileDest\settings.xml)) {
  32. Move-Item -Path $Profile\settings.xml -Destination $ProfileDest\settings.xml
  33. }
  34.  
  35. if (!(Test-Path -Path $Profile\settings.xml)) {
  36. Move-Item -Path $ProfileSource\settings.xml -Destination $Profile\settings.xml
  37. }
  38.  
  39. Get-ChildItem $GameVersion | Copy -Destination $Game -Recurse -Force
  40.  
  41. if (Test-Path -Path $SocialClub) {
  42. Start-Process -FilePath $SocialClub\uninstallRGSCRedistributable.exe -Wait
  43. }
  44.  
  45. if (!(Test-Path -Path $SocialClub)) {
  46. Start-Process -FilePath $SocialClubInstaller -Wait
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement