New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" -Name "$InstallDirectory\CARMA2_HW.EXE" -Value "~ WINXPSP2 HIGHDPIAWARE" -Force
if ($NewPlayerAlias.Length -gt 8) {
$NewPlayerAlias = $NewPlayerAlias.Substring(0, 8)
}
Write-ReplaceContentInFile -Pattern '^PlayerName 0\s+.+' -Substitution "PlayerName 0`r`n$NewPlayerAlias" -FilePath "$InstallDirectory\DATA\OPTIONS.TXT"