slyfox1186

rocket-league-change-screen-resolution.ps1

Mar 24th, 2021 (edited)
1,053
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # This is for rocketleague.exe
  2. # Change the screen resolution on launch
  3. # Make changes as instructed below
  4. # Save this script with a .ps1 extension
  5.  
  6. #########################################################################
  7.  
  8. # FIND THIS
  9. $FindWidth = 'ResX=3840'
  10. $FindHeight = 'ResY=2160'
  11.  
  12. # REPLACE WITH THIS
  13. $ReplaceWidth = 'ResX=1920'
  14. $ReplaceHeight = 'ResY=1080'
  15.  
  16. <# UNCOMMENT THESE VARIABLES IF ONEDRIVE IS INSTALLED
  17. $RLPath = "$Env:OneDrive\Documents\My Games\Rocket League\TAGame\Config"
  18. $InFile = "$RLPath\TASystemSettings.ini"
  19. $OutFile = "$RLPath\TASystemSettings1.ini"
  20. $BakFile = "$RLPath\TASystemSettings.bak"
  21. #>
  22.  
  23. <# UNCOMMENT THESE VARIABLES IF ONEDRIVE IS [NOT] INSTALLED
  24. $RLPath = "$Env:USERPROFILE\Documents\My Games\Rocket League\TAGame\Config"
  25. $InFile = "$RLPath\TASystemSettings.ini"
  26. $OutFile = "$RLPath\TASystemSettings1.ini"
  27. $BakFile = "$RLPath\TASystemSettings.bak"
  28. #>
  29.  
  30. # CREATE A BACKUP FILE
  31. Copy-Item "$InFile" -Destination "$BakFile"
  32.  
  33. # FIND THE TEXT AND REPLACE IT
  34. (Get-Content "$InFile") -Replace "$FindWidth", "$ReplaceWidth" -Encoding 'UTF8' | Out-File "$OutFile"
  35. (Get-Content "$OutFile") -Replace "$FindHeight", "$ReplaceHeight" -Encoding 'UTF8' | Out-File "$InFile"
  36.  
  37. # REMOVE LEFTOVER FILES
  38. Remove-Item "$OutFile" -ErrorAction 'Ignore'
Add Comment
Please, Sign In to add comment