Warhammer 40,000: Dawn of War
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
Properly sets the installation directory in the registry.
$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE"
New-Item -Path "$VirtualStore\WOW6432Node\THQ"
New-Item -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War"
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "AUTH_TIMEOUT" -Value "Unable to authenticate original disc within time limit." -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "TITLEBAR" -Value "" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "NO_DRIVE" -Value "No CD/DVD-ROM drive found." -Force
New-ItemProperty -Path "$VirtualStore\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 "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "ADMIN_RIGHTS" -Value "No administrator rights." -Force
New-ItemProperty -Path "$VirtualStore\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 "$VirtualStore\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 "$VirtualStore\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 "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "WRONG_DISC" -Value "Wrong disc inserted." -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "NO_DISC" -Value "No disc inserted." -Force
New-ItemProperty -Path "$VirtualStore\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 "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "DawnOfWar_ver" -Value "1.51" -Force
New-ItemProperty -Path "$VirtualStore\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 "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "InstallLocation" -Value "$InstallDirectory\" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "WXPCHECK_TITLE" -Value "Error! Cannot locate Dawn of War." -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "CDKEY_WXP" -Value "9c36-f2d2-bd52-bea0-55e6" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Name "CDKEY" -Value "000e-a1f1-19d7-69f5" -Force
New-Item -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Dark Crusade"
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Dark Crusade" -Name "CDKEY" -Value "c946-f025-180a-9581-4ed6" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Dark Crusade" -Name "InstallLocation" -Value "$InstallDirectory\Dawn of War - Dark Crusade" -Force
New-Item -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Dark Crusade\1.00.0000"
New-Item -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm"
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "CDKEY" -Value "879f-6fca-932b-7a2a-7cf0" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "InstallLocation" -Value "$InstallDirectory" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "W40KCDKEY" -Value "000e-a1f1-19d7-69f5" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "WXPCDKEY" -Value "9c36-f2d2-bd52-bea0-55e6" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "DXP2CDKEY" -Value "c946-f025-180a-9581-4ed6" -Force
New-Item -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm\1.00.0000"
New-Item -Path "$VirtualStore\WOW6432Node\THQ"
New-Item -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm"
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "W40KCDKEY" -Value "000e-a1f1-19d7-69f5" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm" -Name "WXPCDKEY" -Value "9c36-f2d2-bd52-bea0-55e6" -Force
New-ItemProperty -Path "$VirtualStore\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 =(\d+)' -Substitution "screenwidth = $($Display.Bounds.Width)" -FilePath "$InstallDirectory\W40k.ini"
Write-ReplaceContentInFile -Pattern '^screenheight =(\d+)' -Substitution "screenheight = $($Display.Bounds.Height)" -FilePath "$InstallDirectory\W40k.ini"
Write-ReplaceContentInFile -Pattern '^screenwindowed=(\d+)' -Substitution "screenwindowed=0" -FilePath "$InstallDirectory\W40k.ini"
Write-ReplaceContentInFile -Pattern '^screenwidth=(\d+)' -Substitution "screenwidth=$($Display.Bounds.Width)" -FilePath "$InstallDirectory\Local.ini"
Write-ReplaceContentInFile -Pattern '^screenheight=(\d+)' -Substitution "screenheight=$($Display.Bounds.Height)" -FilePath "$InstallDirectory\Local.ini"
Write-ReplaceContentInFile -Pattern '^screenwindowed=(\d+)' -Substitution "screenwindowed=0" -FilePath "$InstallDirectory\Local.ini"
Write-ReplaceContentInFile -Pattern '^force_watch_movies=(\d+)' -Substitution "force_watch_movies=0" -FilePath "$InstallDirectory\Local.ini"
Uninstall Script
$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE"
Remove-Item -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War" -Force -Recurse
Remove-Item -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Dark Crusade" -Recurse -Force
Remove-Item -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm" -Recurse -Force
Remove-Item -Path "$VirtualStore\WOW6432Node\THQ\Dawn of War - Soulstorm" -Recurse -Force
Name Change Script
Remove-Item -Path "$InstallDirectory\Profiles\Profile2" -Force -Recurse
Key Change Script
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