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

From LANCommander
No edit summary
No edit summary
Line 9: Line 9:
{{Game.InfoBox.ReleaseDate|Windows|September 20, 2004}}
{{Game.InfoBox.ReleaseDate|Windows|September 20, 2004}}
|Genres =
|Genres =
{{Game.InfoBox.Genre|Real Time Strategy (RTS)}}
{{Game.InfoBox.Genre|Real Time Strategy (RTS)}}{{Game.InfoBox.Genre|Strategy}}
{{Game.InfoBox.Genre|Strategy}}
|PCGamingWiki = Warhammer_40,000:_Dawn_of_War}}
| PCGamingWiki = Warhammer_40,000:_Dawn_of_War
 
{{Game.ActionBox
|Actions =
{{Game.ActionBox.Row|Name = Graphics Config|Path = {InstallDir}\GraphicsConfig.exe|Arguments = |WorkingDirectory = |Primary = False}}
{{Game.ActionBox.Row|Name = Play|Path = {InstallDir}\Soulstorm.exe|Arguments = -nomovies|WorkingDirectory = |Primary = True}}
}}
}}


{{Game.Scripts.KeyChange
 
|Name = Key Change Script
{{Game.Scripts.Install
|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>".
|Name = Install Script
|Description = Properly sets the installation directory in the registry.
|RequiresAdmin = True
|RequiresAdmin = True
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$Key = $args[0]
<syntaxhighlight lang="powershell" line>
New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ"


$Key = $Key.Replace("-", "")
New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War"
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "AUTH_TIMEOUT" -Value "Unable to authenticate original disc within time limit." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "TITLEBAR" -Value "" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "NO_DRIVE" -Value "No CD/DVD-ROM drive found." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "NO_ORIG_FOUND" -Value "Please insert the original disc instead of a backup. See www.securom.com/copy for more details." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "ADMIN_RIGHTS" -Value "No administrator rights." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "EMULATION_DETECTED" -Value "Conflict with Disc Emulator Software detected. See www.securom.com/emulation for more details." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "ANALYSIS_DONE" -Value "The Information was successfully collected and stored to the following file\n"%FILE%"\nPlease contact Customer Support for forwarding instructions." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "ANALYSIS_DISCLAIMER" -Value "Dear Software User,\n\nThis test program has been developed with your personal interest in mind to check for possible hardware and/or software incompatibility on your PC. To shorten the analysis time, system information is collected (similar to the Microsoft's msinfo32.exe program).\nData will be compared with our knowledge base to discover hardware/software conflicts. Submitting the log file is totally voluntary. The collected data is for evaluation purposes only and is not used in any other manner.\nYour Support Team\nDo you want to start?" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "WRONG_DISC" -Value "Wrong disc inserted." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "NO_DISC" -Value "No disc inserted." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "WXPCHECK_FAILEDLAUNCH" -Value "Your installation appears to be corrupt. Please re-install both Dawn of War and Winter Assault." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "DawnOfWar_ver" -Value "1.51" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "WXPCHECK_MISSINGFILES" -Value "You have uninstalled Dawn of War, which is required to run Winter Assault. Please re-install both Dawn of War and Winter Assault." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "InstallLocation" -Value "$InstallDirectory\" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "WXPCHECK_TITLE" -Value "Error! Cannot locate Dawn of War." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "CDKEY_WXP" -Value "9c36-f2d2-bd52-bea0-55e6" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "CDKEY" -Value "000e-a1f1-19d7-69f5" -Force


$BaseKey, $SoulStormKey, $WinterAssaultKey, $DarkCrusadeKey = $Key -Split ',',4
New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Dark Crusade"
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Dark Crusade" -Name "CDKEY" -Value "c946-f025-180a-9581-4ed6" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Dark Crusade" -Name "InstallLocation" -Value "$InstallDirectory\Dawn of War - Dark Crusade" -Force


# Non-destructively creates path in registry
New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Dark Crusade\1.00.0000"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\THQ"
 
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom"
New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm"
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "CDKEY" -Value "879f-6fca-932b-7a2a-7cf0" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "InstallLocation" -Value "$InstallDirectory" -Force
 
New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm\1.00.0000"
 
New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ"
 
New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm"
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "W40KCDKEY" -Value "000e-a1f1-19d7-69f5" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "WXPCDKEY" -Value "9c36-f2d2-bd52-bea0-55e6" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "DXP2CDKEY" -Value "c946-f025-180a-9581-4ed6" -Force
 
# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay


# Creates or updates a key in the registry
Write-ReplaceContentInFile -Pattern '^screenwidth =(.+)' -Substitution "screenwidth = $($Display.Bounds.Width)" -FilePath "$InstallDirectory\W40k.ini"
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom" -Name "CDKEY" -Value $SoulStormKey -Force
Write-ReplaceContentInFile -Pattern '^screenheight =(.+)' -Substitution "screenheight = $($Display.Bounds.Height)" -FilePath "$InstallDirectory\W40k.ini"
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom" -Name "DXP2CDKEY" -Value $DarkCrusadeKey -Force
Write-ReplaceContentInFile -Pattern '^screenwidth=(.+)' -Substitution "screenwidth=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\Local.ini"
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom" -Name "W40KCDKEY" -Value $BaseKey -Force
Write-ReplaceContentInFile -Pattern '^screenheight=(.+)' -Substitution "screenheight=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\Local.ini"
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom" -Name "WXPCDKEY" -Value $WinterAssaultKey -Force
Write-ReplaceContentInFile -Pattern '^force_watch_movies=(.+)' -Substitution "force_watch_movies=0" -FilePath "$InstallDirectory\Local.ini"
</syntaxhighlight>
</syntaxhighlight>
}}
}}
           
{{Game.Scripts.Uninstall
|Name = Uninstall Script
|Description =
|RequiresAdmin = True
|Contents =
<syntaxhighlight lang="powershell" line>
Remove-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -force -recurse
Remove-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Dark Crusade" -recurse -force
Remove-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -recurse -force
Remove-Item -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -recurse -force


{{Game.Scripts.Install
</syntaxhighlight>
|Name = Install Script
}}
|Description = Properly sets the installation directory in the registry.
           
{{Game.Scripts.NameChange
|Name = Name Change Script
|Description =  
|RequiresAdmin = False
|Contents =
<syntaxhighlight lang="powershell" line>
Remove-Item -Path "$InstallDirectory\Profiles\Profile1" -force -recurse
</syntaxhighlight>
}}
           
{{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 &quot;&lt;BaseKey&gt;,&lt;SoulStormKey&gt;,&lt;WinterAssaultKey&gt;,&lt;DarkCrusadeKey&gt;&quot;.
|RequiresAdmin = True
|RequiresAdmin = True
|Contents = <syntaxhighlight lang="powershell" line>
|Contents =
$InstallDir = $PSScriptRoot
<syntaxhighlight lang="powershell" line>
 
#$Key = $AllocatedKey
#
#$Key = $Key.Replace("-", "")
#
#$BaseKey, $SoulStormKey, $WinterAssaultKey, $DarkCrusadeKey = $Key -Split ',',4
#
# Non-destructively creates path in registry
# Non-destructively creates path in registry
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\THQ"
#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"
New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom\1.00.0000"
#
 
# Creates or updates a key in the registry
# Creates or updates a key in the registry
New-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstrom" -Name "InstallLocation" -Value $InstallDir -Force
#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>
</syntaxhighlight>
}}
}}

Revision as of 21:58, 8 January 2024

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

Actions

Name Path Arguments Working Directory Primary
Graphics Config {InstallDir}\GraphicsConfig.exe False
Play {InstallDir}\Soulstorm.exe -nomovies True

Install Script

This script requires admin access to function properly

Properly sets the installation directory in the registry.

New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ"

New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War"
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "AUTH_TIMEOUT" -Value "Unable to authenticate original disc within time limit." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "TITLEBAR" -Value "" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "NO_DRIVE" -Value "No CD/DVD-ROM drive found." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "NO_ORIG_FOUND" -Value "Please insert the original disc instead of a backup. See www.securom.com/copy for more details." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "ADMIN_RIGHTS" -Value "No administrator rights." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "EMULATION_DETECTED" -Value "Conflict with Disc Emulator Software detected. See www.securom.com/emulation for more details." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "ANALYSIS_DONE" -Value "The Information was successfully collected and stored to the following file\n"%FILE%"\nPlease contact Customer Support for forwarding instructions." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "ANALYSIS_DISCLAIMER" -Value "Dear Software User,\n\nThis test program has been developed with your personal interest in mind to check for possible hardware and/or software incompatibility on your PC. To shorten the analysis time, system information is collected (similar to the Microsoft's msinfo32.exe program).\nData will be compared with our knowledge base to discover hardware/software conflicts. Submitting the log file is totally voluntary. The collected data is for evaluation purposes only and is not used in any other manner.\nYour Support Team\nDo you want to start?" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "WRONG_DISC" -Value "Wrong disc inserted." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "NO_DISC" -Value "No disc inserted." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "WXPCHECK_FAILEDLAUNCH" -Value "Your installation appears to be corrupt. Please re-install both Dawn of War and Winter Assault." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "DawnOfWar_ver" -Value "1.51" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "WXPCHECK_MISSINGFILES" -Value "You have uninstalled Dawn of War, which is required to run Winter Assault. Please re-install both Dawn of War and Winter Assault." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "InstallLocation" -Value "$InstallDirectory\" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "WXPCHECK_TITLE" -Value "Error! Cannot locate Dawn of War." -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "CDKEY_WXP" -Value "9c36-f2d2-bd52-bea0-55e6" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -Name "CDKEY" -Value "000e-a1f1-19d7-69f5" -Force

New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Dark Crusade"
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Dark Crusade" -Name "CDKEY" -Value "c946-f025-180a-9581-4ed6" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Dark Crusade" -Name "InstallLocation" -Value "$InstallDirectory\Dawn of War - Dark Crusade" -Force

New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Dark Crusade\1.00.0000"

New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm"
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "CDKEY" -Value "879f-6fca-932b-7a2a-7cf0" -Force
New-ItemProperty -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "InstallLocation" -Value "$InstallDirectory" -Force

New-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm\1.00.0000"

New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ"

New-Item -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm"
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "W40KCDKEY" -Value "000e-a1f1-19d7-69f5" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "WXPCDKEY" -Value "9c36-f2d2-bd52-bea0-55e6" -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "DXP2CDKEY" -Value "c946-f025-180a-9581-4ed6" -Force

# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay

Write-ReplaceContentInFile -Pattern '^screenwidth =(.+)' -Substitution "screenwidth = $($Display.Bounds.Width)" -FilePath "$InstallDirectory\W40k.ini"
Write-ReplaceContentInFile -Pattern '^screenheight =(.+)' -Substitution "screenheight = $($Display.Bounds.Height)" -FilePath "$InstallDirectory\W40k.ini"
Write-ReplaceContentInFile -Pattern '^screenwidth=(.+)' -Substitution "screenwidth=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\Local.ini"
Write-ReplaceContentInFile -Pattern '^screenheight=(.+)' -Substitution "screenheight=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\Local.ini"
Write-ReplaceContentInFile -Pattern '^force_watch_movies=(.+)' -Substitution "force_watch_movies=0" -FilePath "$InstallDirectory\Local.ini"

Uninstall Script

This script requires admin access to function properly

Remove-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War" -force -recurse
Remove-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Dark Crusade" -recurse -force
Remove-Item -Path "registry::\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -recurse -force
Remove-Item -Path "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\WOW6432Node\THQ\Dawn of War - Soulstorm" -recurse -force

Name Change Script

Remove-Item -Path "$InstallDirectory\Profiles\Profile1" -force -recurse

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 = $AllocatedKey
#
#$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