Commandos: Behind Enemy Lines

From LANCommander
Revision as of 00:40, 22 February 2024 by DoctorDalek (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Pyro Studios
Publishers
Eidos Interactive
Release Date
Windows: July 31, 1998
Genres
PuzzleStrategyTactical
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play Commandos: Behind Enemy Lines {InstallDir}\comandos_w10.exe True

Install Script

$DocumentsPath = [Environment]::GetFolderPath("MyDocuments")
$uri = New-Object System.Uri($ServerAddress)
$Server = $uri.Host
$configpath = "$env:userprofile\Documents\Pyro Studios\Commandos\OUTPUT\COMANDO.CFG"
Copy-Item -Path "$InstallDirectory\Pyro Studios" -Destination "$DocumentsPath" -Recurse
Write-ReplaceContentInFile -Pattern '^.SERVERADDRESS (.+)' -Substitution ".SERVERADDRESS $Server" -FilePath "$configpath"
Rename-Item -Path "$InstallDirectory\VIDEO\H_Intro.avi" -NewName "$InstallDirectory\VIDEO\H_Intro.bak"

Uninstall Script

$DocumentsPath = [Environment]::GetFolderPath("MyDocuments")
Remove-Item -Path "$DocumentsPath\Pyro Studios" -Recurse -force

Name Change Script

$configpath1 = "$env:userprofile\Documents\Pyro Studios\Commandos\OUTPUT\COMANDO.CFG"
# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^.NETGAMEPLAYER (.+)' -Substitution ".NETGAMEPLAYER $NewPlayerAlias" -FilePath "$configPath1"