# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay
$X = $Display.Bounds.Width
$Y = $Display.Bounds.Height
Write-ReplaceContentInFile -Pattern 'StartupFullscreen=(.+)' -Substitution "StartupFullscreen=True" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'WindowedViewportX=(.+)' -Substitution "WindowedViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'WindowedViewportY=(.+)' -Substitution "WindowedViewportY=$Y" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$Y" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'MenuViewportX=(.+)' -Substitution "MenuViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'MenuViewportY=(.+)' -Substitution "MenuViewportY=$Y" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'StartupFullscreen=(.+)' -Substitution "StartupFullscreen=True" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'WindowedViewportX=(.+)' -Substitution "WindowedViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'WindowedViewportY=(.+)' -Substitution "WindowedViewportY=$Y" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$Y" -FilePath "$InstallDirectory\ShareThePain\Postal2MP\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'MenuViewportX=(.+)' -Substitution "MenuViewportX=$X" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"
Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\ShareThePain\System\Default.ini"
Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\ShareThePain\System\User.ini"
Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\ShareThePain\System\Postal2MP.ini"