Warhammer 40,000: Dawn of War: Difference between revisions

From LANCommander
(Created page with "Category:Games {{Game.InfoBox |Cover = cover.jpg |Developers = {{Game.InfoBox.Developer|Relic Entertainment}} |Publishers = {{Game.InfoBox.Publisher|THQ}} |Release Date = {{Game.InfoBox.ReleaseDate|Windows|September 20, 2004}} |Genres = {{Game.InfoBox.Genre|Real Time Strategy (RTS)}} {{Game.InfoBox.Genre|Strategy}} | PCGamingWiki = Warhammer_40,000:_Dawn_of_War }}")
 
No edit summary
Line 12: Line 12:
{{Game.InfoBox.Genre|Strategy}}
{{Game.InfoBox.Genre|Strategy}}
| PCGamingWiki = Warhammer_40,000:_Dawn_of_War
| PCGamingWiki = Warhammer_40,000:_Dawn_of_War
}}
{{Game.Scripts.KeyChange
|Name = Key Change Script
|Description = 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>".
|RequiresAdmin = True
|Contents = <syntaxhighlight lang="powershell" line>
$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
</syntaxhighlight>
}}
{{Game.Scripts.Install
|Name = Install Script
|Description = Properly sets the installation directory in the registry.
|RequiresAdmin = True
|Contents = <syntaxhighlight lang="powershell" line>
$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
</syntaxhighlight>
}}
}}

Revision as of 01:35, 2 August 2023

Developers
Relic Entertainment
Publishers
THQ
Release Date
Windows: September 20, 2004
Genres
Real Time Strategy (RTS)

Strategy

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