$Display = Get-PrimaryDisplay
Write-ReplaceContentInFile -Pattern '^xres = (.+)' -Substitution "xres = $($Display.Bounds.Width)" -FilePath "$InstallDirectory\config\dusk.ini"
Write-ReplaceContentInFile -Pattern '^yres = (.+)' -Substitution "yres = $($Display.Bounds.Width)" -FilePath "$InstallDirectory\config\dusk.ini"
Write-ReplaceContentInFile -Pattern '^xres = (.+)' -Substitution "xres = $($Display.Bounds.Width)" -FilePath "$InstallDirectory\config\duskworld.ini"
Write-ReplaceContentInFile -Pattern '^yres = (.+)' -Substitution "yres = $($Display.Bounds.Width)" -FilePath "$InstallDirectory\config\duskworld.ini"
Write-ReplaceContentInFile -Pattern '^multiplayername = (.+)' -Substitution "multiplayername = $NewPlayerAlias" -FilePath "$InstallDirectory\config\duskworld.ini"