Actions
Name |
Path |
Arguments |
Working Directory |
Primary |
Play |
w2.exe |
|
|
True |
Install Script
Adds necessary registry keys and sets video resolution to the main display's resolution.
$InstallDir = $PSScriptRoot
Add-Type -AssemblyName System.Windows.Forms
$Display = [System.Windows.Forms.Screen]::AllScreens | Where-Object Primary | Select Bounds
$BasePath = "HKCU:\SOFTWARE\Team17DigitalLTD\WormsWorldParty"
$NetSettingsPath = "$BasePath\NetSettings"
$OptionsPath = "$BasePath\Options"
New-Item -Path "$BasePath" -Force
New-Item -Path "$NetSettingsPath" -Force
New-Item -Path "$OptionsPath" -Force
New-ItemProperty -Path "$NetSettingsPath" -Name "AddressOverride" -Value 0
New-ItemProperty -Path "$NetSettingsPath" -Name "AutoPing" -Value 1
New-ItemProperty -Path "$NetSettingsPath" -Name "FilterLanguage" -Value 0
New-ItemProperty -Path "$NetSettingsPath" -Name "HostingPort" -Value 17011
New-ItemProperty -Path "$NetSettingsPath" -Name "Location" -Value 0
New-ItemProperty -Path "$NetSettingsPath" -Name "PlayerName" -Value "Vintage"
New-ItemProperty -Path "$NetSettingsPath" -Name "Protocol" -Value 1
New-ItemProperty -Path "$NetSettingsPath" -Name "ProxyPort" -Value 0
New-ItemProperty -Path "$NetSettingsPath" -Name "ServerLaunched" -Value 1
New-ItemProperty -Path "$NetSettingsPath" -Name "UpdatePrompt" -Value 0
New-ItemProperty -Path "$NetSettingsPath" -Name "UpdateServerList" -Value 1
New-ItemProperty -Path "$NetSettingsPath" -Name "UseProxy" -Value 0
New-ItemProperty -Path "$NetSettingsPath" -Name "UserId" -Value "1"
New-ItemProperty -Path "$NetSettingsPath" -Name "UseUPnP" -Value 1
New-ItemProperty -Path "$OptionsPath" -Name "Animations" -Value 1
New-ItemProperty -Path "$OptionsPath" -Name "CD Tracks" -Value 127
New-ItemProperty -Path "$OptionsPath" -Name "Detail" -Value 5
New-ItemProperty -Path "$OptionsPath" -Name "DetailLevel" -Value 4
New-ItemProperty -Path "$OptionsPath" -Name "DisplaySize" -Value 3 # Custom
New-ItemProperty -Path "$OptionsPath" -Name "DisplayXSize" -Value $Display.Width
New-ItemProperty -Path "$OptionsPath" -Name "DisplayYSize" -Value $Display.Height
New-ItemProperty -Path "$OptionsPath" -Name "EnergyBar" -Value 0
New-ItemProperty -Path "$OptionsPath" -Name "Filter" -Value 1
New-ItemProperty -Path "$OptionsPath" -Name "RemasteredAudio" -Value 1
New-ItemProperty -Path "$OptionsPath" -Name "Volume" -Value 1
New-ItemProperty -Path "$OptionsPath" -Name "vSync" -Value 1
Uninstall Script
$BasePath = "HKCU:\SOFTWARE\Team17DigitalLTD\WormsWorldParty"
Remove-Item -Path "$BasePath" -Force -Recurse
Name Change Script
$InstallDir = $PSScriptRoot
$NewName = $args[0]
if ($NewName.Length -gt 15) {
$NewName = $NewName.Substring(0, 15)
}
$BasePath = "HKCU:\SOFTWARE\Team17DigitalLTD\WormsWorldParty"
$NetSettingsPath = "$BasePath\NetSettings"
New-ItemProperty -Path "$NetSettingsPath" -Name "PlayerName" -Value "$NewName"