# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Regex '^INGAME_RES=(.+)' -Replacement "INGAME_RES=$($Display.Bounds.Width)x$($Display.Bounds.Height)x32" -FilePath "$InstallDirectory\keeperfx.cfg"
$bytes = ConvertTo-StringBytes -Input "$NewPlayerAlias" -MaxLength 19
Edit-PatchBinary -FilePath "$InstallDirectory\save\fxconfig.net" -Offset 0x14 -Data $bytes