Unreal Tournament 2004: Difference between revisions
DoctorDalek (talk | contribs) No edit summary |
DoctorDalek (talk | contribs) No edit summary |
||
Line 40: | Line 40: | ||
} | } | ||
Write-ReplaceContentInFile -Pattern '^DesiredFOV=(.+)' -Substitution "DesiredFOV=$FOV" -FilePath "$InstallDirectory\System\ | Write-ReplaceContentInFile -Pattern '^DesiredFOV=(.+)' -Substitution "DesiredFOV=$FOV" -FilePath "$InstallDirectory\System\ut2004.ini" | ||
Write-ReplaceContentInFile -Pattern '^DefaultFOV=(.+)' -Substitution "DefaultFOV=$FOV" -FilePath "$InstallDirectory\System\ | Write-ReplaceContentInFile -Pattern '^DefaultFOV=(.+)' -Substitution "DefaultFOV=$FOV" -FilePath "$InstallDirectory\System\ut2004.ini" | ||
Write-ReplaceContentInFile -Pattern '^FOVAngle=(.+)' -Substitution "DefaultFOV=$FOV.0" -FilePath "$InstallDirectory\System\ut2004.ini" | |||
$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE" | |||
# Creates or updates a key in the registry | |||
# Non-destructively creates path in registry | |||
New-Item -Path "$VirtualStore\WOW6432Node\Unreal Technology" | |||
New-Item -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps" | |||
New-Item -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "Version" -Value "1" -Force | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "CDKey" -Value "3QHVC-DHA9K-A84RE-KYRT4" -Force | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "ADMIN_RIGHTS" -Value "You need to run this program as an administrator, not as a guest or limited user account." -Force | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "NO_DISC" -Value "No disc in drive. Please insert the disc labeled 'Unreal Tournament 2004 Play Disc' to continue." -Force | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "NO_DRIVE" -Value "No CD-ROM or DVD-ROM drive detected." -Force | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "TITLEBAR" -Value "Unreal Tournament 2004" -Force | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "WRONG_DISC" -Value "Wrong disc in drive. Please insert the disc labeled 'Unreal Tournament 2004 Play Disc' to continue." -Force | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "YEAR" -Value "2004" -Force | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "Folder" -Value "$InstallDirectory" -Force | |||
</syntaxhighlight> | |||
}} | |||
{{Game.Scripts.Uninstall | |||
|Name = Uninstall Script | |||
|Description = | |||
|RequiresAdmin = False | |||
|Contents = | |||
<syntaxhighlight lang="powershell" line> | |||
$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE" | |||
Remove-Item -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Force -Recurse | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |
Revision as of 00:52, 22 February 2024
Developers | |
---|---|
Epic Games | |
Publishers | |
Atari, Inc.Epic GamesMacSoft Games | |
Release Date | |
Windows: March 16, 2004 | |
Genres | |
Shooter | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play | {InstallDir}\System/UT2004.exe | True |
Install Script
# 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 -Pattern '^FullscreenViewportX=(.+)' -Substitution "FullscreenViewportX=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\System\ut2004.ini"
Write-ReplaceContentInFile -Pattern '^FullscreenViewportY=(.+)' -Substitution "FullscreenViewportY=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\System\ut2004.ini"
# Might need to set FOV
$FOV = 90
if (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 9)) {
$FOV = 106
} elseif (($Display.Bounds.Width / $Display.Bounds.Height) -eq (16 / 10)) {
$FOV = 100
}
Write-ReplaceContentInFile -Pattern '^DesiredFOV=(.+)' -Substitution "DesiredFOV=$FOV" -FilePath "$InstallDirectory\System\ut2004.ini"
Write-ReplaceContentInFile -Pattern '^DefaultFOV=(.+)' -Substitution "DefaultFOV=$FOV" -FilePath "$InstallDirectory\System\ut2004.ini"
Write-ReplaceContentInFile -Pattern '^FOVAngle=(.+)' -Substitution "DefaultFOV=$FOV.0" -FilePath "$InstallDirectory\System\ut2004.ini"
$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE"
# Creates or updates a key in the registry
# Non-destructively creates path in registry
New-Item -Path "$VirtualStore\WOW6432Node\Unreal Technology"
New-Item -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps"
New-Item -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004"
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "Version" -Value "1" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "CDKey" -Value "3QHVC-DHA9K-A84RE-KYRT4" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "ADMIN_RIGHTS" -Value "You need to run this program as an administrator, not as a guest or limited user account." -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "NO_DISC" -Value "No disc in drive. Please insert the disc labeled 'Unreal Tournament 2004 Play Disc' to continue." -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "NO_DRIVE" -Value "No CD-ROM or DVD-ROM drive detected." -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "TITLEBAR" -Value "Unreal Tournament 2004" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "WRONG_DISC" -Value "Wrong disc in drive. Please insert the disc labeled 'Unreal Tournament 2004 Play Disc' to continue." -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "YEAR" -Value "2004" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Name "Folder" -Value "$InstallDirectory" -Force
Uninstall Script
$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE"
Remove-Item -Path "$VirtualStore\WOW6432Node\Unreal Technology\Installed Apps\UT2004" -Force -Recurse
Name Change Script
Write-ReplaceContentInFile -Pattern 'Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\System\User.ini"