Half-Life 2: Deathmatch
Developers | |
---|---|
Valve | |
Publishers | |
Valve | |
Release Date | |
Windows: November 30, 2004 | |
Genres | |
Shooter | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play | Half-Life 2 Deathmatch.exe | True |
Key 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 'PlayerName=(.+)' -Replacement "PlayerName=$NewName" -FilePath "$InstallDir\rev.ini"
Write-ReplaceContentInFile -Regex 'ClanTag=(.+)' -Replacement "ClanTag=" -FilePath "$InstallDir\rev.ini"