$Documents = [Environment]::GetFolderPath("MyDocuments")
$Display = Get-PrimaryDisplay
Copy-Item -Path "$InstallDirectory\Profile" -Destination "$Documents\RTCW" -Recurse
Write-ReplaceContentInFile -Pattern 'seta r_customwidth (.+)' -Substitution "seta r_customwidth ""$($Display.Bounds.Width)""" -FilePath "$Documents\RTCW\main\wolfconfig_mp.cfg"
Write-ReplaceContentInFile -Pattern 'seta r_customheight (.+)' -Substitution "seta r_customheight ""$($Display.Bounds.Height)""" -FilePath "$Documents\RTCW\main\wolfconfig_mp.cfg"
Write-ReplaceContentInFile -Pattern 'seta r_mode (.+)' -Substitution "seta r_mode ""-1""" -FilePath "$Documents\RTCW\main\wolfconfig_mp.cfg"
Write-ReplaceContentInFile -Pattern 'seta r_fullscreen (.+)' -Substitution "seta r_fullscreen ""1""" -FilePath "$Documents\RTCW\main\wolfconfig_mp.cfg"
$Documents = [Environment]::GetFolderPath("MyDocuments")
Write-ReplaceContentInFile -Pattern 'seta name (.+)' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$Documents\RTCW\main\wolfconfig_mp.cfg"