Nox: Difference between revisions
DoctorDalek (talk | contribs) (Created new page for Nox) |
DoctorDalek (talk | contribs) No edit summary |
||
Line 21: | Line 21: | ||
|Name = Install Script | |Name = Install Script | ||
|Description = | |Description = | ||
|RequiresAdmin = | |RequiresAdmin = False | ||
|Contents = | |Contents = | ||
<syntaxhighlight lang="powershell" line> | <syntaxhighlight lang="powershell" line> | ||
$Display = Get-PrimaryDisplay | |||
New-ItemProperty -Path " | $VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE" | ||
New-ItemProperty -Path " | |||
New-ItemProperty -Path " | New-Item -Path "$VirtualStore\WOW6432Node\Westwood\Nox" | ||
New-ItemProperty -Path " | New-ItemProperty -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Name "Name" -Value "Nox" -Force | ||
New-ItemProperty -Path " | New-ItemProperty -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Name "InstallPath" -Value "$InstallDirectory\Nox.EXE" -Force | ||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Name "SKU" -Value 9472 -Force | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Name "Version" -Value 65538 -Force | |||
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Name "Serial" -Value "664633-703436-227220-5728" -Force | |||
Rename-Item -Path "$InstallDirectory\MOVIES\INTRO.VQA" -NewName "$InstallDirectory\MOVIES\INTRO.VQA.bak" | Rename-Item -Path "$InstallDirectory\MOVIES\INTRO.VQA" -NewName "$InstallDirectory\MOVIES\INTRO.VQA.bak" | ||
Rename-Item -Path "$InstallDirectory\MOVIES\NOXLOGO.VQA" -NewName "$InstallDirectory\MOVIES\NOXLOGO.VQA.bak" | Rename-Item -Path "$InstallDirectory\MOVIES\NOXLOGO.VQA" -NewName "$InstallDirectory\MOVIES\NOXLOGO.VQA.bak" | ||
Rename-Item -Path "$InstallDirectory\MOVIES\WWLOGO.VQA" -NewName "$InstallDirectory\MOVIES\WWLOGO.VQA.bak" | Rename-Item -Path "$InstallDirectory\MOVIES\WWLOGO.VQA" -NewName "$InstallDirectory\MOVIES\WWLOGO.VQA.bak" | ||
$X = $Display.Bounds.Width | |||
$Y = $Display.Bounds.Height | |||
$NoxX = 1024 | |||
$NoxY = 768 | |||
if (($X / $Y) -eq (16 / 9)) { | |||
$NoxX = 1024 | |||
$NoxY = 576 | |||
} elseif (($X / $Y) -eq (16 / 10)) { | |||
$NoxX = 1024 | |||
$NoxY = 640 | |||
} | |||
Write-ReplaceContentInFile -Pattern '^VideoMode = (.+)' -Substitution "VideoMode = $NoxX $NoxY 16" -FilePath "$InstallDirectory\nox.cfg" | |||
Write-ReplaceContentInFile -Pattern '^VideoMode = (.+)' -Substitution "VideoMode = $NoxX $NoxY 16" -FilePath "$InstallDirectory\default.cfg" | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} | ||
Line 40: | Line 60: | ||
|Name = Uninstall Script | |Name = Uninstall Script | ||
|Description = | |Description = | ||
|RequiresAdmin = | |RequiresAdmin = False | ||
|Contents = | |Contents = | ||
<syntaxhighlight lang="powershell" line> | <syntaxhighlight lang="powershell" line> | ||
$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE" | |||
Remove-Item -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Recurse -Force | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |
Latest revision as of 00:47, 22 February 2024
Release Date | |
---|---|
Windows: January 1, 0001 | |
View at PCGamingWiki |
Actions
Name | Path | Arguments | Working Directory | Primary |
---|---|---|---|---|
Play | {InstallDir}\OpenNox\opennox-hd.exe | True |
Install Script
$Display = Get-PrimaryDisplay
$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE"
New-Item -Path "$VirtualStore\WOW6432Node\Westwood\Nox"
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Name "Name" -Value "Nox" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Name "InstallPath" -Value "$InstallDirectory\Nox.EXE" -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Name "SKU" -Value 9472 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Name "Version" -Value 65538 -Force
New-ItemProperty -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Name "Serial" -Value "664633-703436-227220-5728" -Force
Rename-Item -Path "$InstallDirectory\MOVIES\INTRO.VQA" -NewName "$InstallDirectory\MOVIES\INTRO.VQA.bak"
Rename-Item -Path "$InstallDirectory\MOVIES\NOXLOGO.VQA" -NewName "$InstallDirectory\MOVIES\NOXLOGO.VQA.bak"
Rename-Item -Path "$InstallDirectory\MOVIES\WWLOGO.VQA" -NewName "$InstallDirectory\MOVIES\WWLOGO.VQA.bak"
$X = $Display.Bounds.Width
$Y = $Display.Bounds.Height
$NoxX = 1024
$NoxY = 768
if (($X / $Y) -eq (16 / 9)) {
$NoxX = 1024
$NoxY = 576
} elseif (($X / $Y) -eq (16 / 10)) {
$NoxX = 1024
$NoxY = 640
}
Write-ReplaceContentInFile -Pattern '^VideoMode = (.+)' -Substitution "VideoMode = $NoxX $NoxY 16" -FilePath "$InstallDirectory\nox.cfg"
Write-ReplaceContentInFile -Pattern '^VideoMode = (.+)' -Substitution "VideoMode = $NoxX $NoxY 16" -FilePath "$InstallDirectory\default.cfg"
Uninstall Script
$VirtualStore = "registry::\HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE"
Remove-Item -Path "$VirtualStore\WOW6432Node\Westwood\Nox" -Recurse -Force