Warhammer 40,000: Dawn of War
Developers | |
---|---|
Relic Entertainment | |
Publishers | |
THQ | |
Release Date | |
Windows: September 20, 2004 | |
Genres | |
Real Time Strategy (RTS) | |
View at PCGamingWiki |
Key Change Script
This script requires admin access to function properly
The game and the three expansions means that 4 keys are needed. This can be solved by putting the keys in LANCommander comma separated. This script will split them, with the order as "<BaseKey>,<SoulStormKey>,<WinterAssaultKey>,<DarkCrusadeKey>".
$Key = $args[0]
$Key = $Key.Replace("-", "")
$BaseKey, $SoulStormKey, $WinterAssaultKey, $DarkCrusadeKey = $Key -Split ',',4
# Non-destructively creates path in registry
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\THQ"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom"
# Creates or updates a key in the registry
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom" -Name "CDKEY" -Value $SoulStormKey -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom" -Name "DXP2CDKEY" -Value $DarkCrusadeKey -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom" -Name "W40KCDKEY" -Value $BaseKey -Force
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom" -Name "WXPCDKEY" -Value $WinterAssaultKey -Force
Install Script
This script requires admin access to function properly
Properly sets the installation directory in the registry.
$InstallDir = $PSScriptRoot
# Non-destructively creates path in registry
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\THQ"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom\1.00.0000"
# Creates or updates a key in the registry
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom" -Name "InstallLocation" -Value $InstallDir -Force