Wolfenstein: Enemy Territory

From LANCommander
Revision as of 23:39, 20 July 2024 by MrCaffeen (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Splash Damage
Publishers
id SoftwareActivision
Release Date
Windows: May 29, 2003
Genres
Shooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Wolfenstein: Enemy Territory etl.exe {InstallDir} True
Play Wolfenstein: Enemy Territory etl.exe +connect x.x.x.x:nnnnn +password ****** {InstallDir} True

Uninstall Script

$Documents = [Environment]::GetFolderPath('MyDocuments')

Remove-Item "$Documents\ETLegacy" -Recurse -ErrorAction Ignore

Name Change Script

$Documents = [Environment]::GetFolderPath('MyDocuments')

$NewPlayerAlias = $NewPlayerAlias.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'
$OldPlayerAlias = $OldPlayerAlias.Split([IO.Path]::GetInvalidFileNameChars()) -join '_'

if ((Test-Path -Path "$Documents\ETLegacy\legacy\profiles\$OldPlayerAlias") -And ($OldPlayerAlias -ne $NewPlayerAlias)) {
    Rename-Item "$Documents\ETLegacy\legacy\profiles\$OldPlayerAlias" "$NewPlayerAlias"
} else {
    Copy-Item -Path "$InstallDirectory\profile" -Destination "$Documents\ETLegacy" -Recurse
    Rename-Item "$Documents\ETLegacy\legacy\profiles\DoctorDalek" "$NewPlayerAlias"
}

Write-ReplaceContentInFile -Pattern '^seta name "(.+)"' -Substitution "seta name ""$NewPlayerAlias""" -FilePath "$Documents\ETLegacy\legacy\profiles\$NewPlayerAlias\etconfig.cfg"

"""$NewPlayerAlias""" | Out-File -FilePath "$Documents\ETLegacy\legacy\profiles\defaultprofile.dat" -Encoding ASCII -NoNewLine
"""$NewPlayerAlias""" | Out-File -FilePath "$Documents\ETLegacy\legacy\profiles\$NewPlayerAlias\profile.dat" -Encoding ASCII -NoNewLine