Actions
Name |
Path |
Arguments |
Working Directory |
Primary |
Call of Duty: United Offensive (Multiplayer) |
CoDUOMP.exe |
|
|
True |
Call of Duty (Multiplayer) |
CoDMP.exe |
|
|
True |
Call of Duty (Singleplayer) |
CoDSP.exe |
|
|
True |
Call of Duty: United Offensive (Singleplayer) |
CoDUOSP.exe |
|
|
True |
Save Paths
Type |
Path |
Registry |
HKLM:\SOFTWARE\WOW6432Node\Activision\Call of Duty United Offensive |
Registry |
HKLM:\SOFTWARE\WOW6432Node\Activision\Call of Duty |
File |
{InstallDir}/Main/config_mp.cfg |
File |
{InstallDir}/uo/uoconfig_mp.cfg |
Name Change Script
$NewName = $args[0]
$InstallDir = $PSScriptRoot
function Write-ReplaceContentInFile([string]$Regex, [string]$Replacement, [string]$FilePath)
{
$content = (Get-Content $FilePath) -replace $Regex, $Replacement
[IO.File]::WriteAllLines($FilePath, $content)
}
Write-ReplaceContentInFile -Regex '^seta name (.+)' -Replacement "seta name ""$NewName""" -FilePath "$InstallDir\Main\config_mp.cfg"
Write-ReplaceContentInFile -Regex '^seta name (.+)' -Replacement "seta name ""$NewName""" -FilePath "$InstallDir\uo\uoconfig_mp.cfg"
Key Change Script
This script requires admin access to function properly
# Requires Admin
$Key = $args[0]
$Key = $Key.Replace("-", "")
$codkey, $coduokey = $Key -Split ',',2
# Non-destructively creates path in registry
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Activision"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Activision\Call of Duty"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Activision\Call of Duty United Offensive"
# Creates or updates a key in the registry
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Activision\Call of Duty" -Name "codkey" -Value $codkey -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Activision\Call of Duty United Offensive" -Name "key" -Value $coduokey -Force