Postal 2

From LANCommander
Developers
Running with Scissors
Publishers
Whiptail Interactive
Release Date
Windows: April 13, 2003
Genres
AdventureIndieShooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Singleplayer {InstallDir}\System/Postal2.exe True
Play Multiplayer {InstallDir}\ShareThePain/System/Postal2MP.exe True

Install Script

# 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"

Name Change Script

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"