James Bond 007: Nightfire

From LANCommander
Revision as of 02:13, 6 January 2024 by DoctorDalek (talk | contribs) (Created new page for James Bond 007: Nightfire)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Gearbox SoftwareEurocom Entertainment SoftwareTransGaming Inc.
Publishers
Electronic ArtsAspyr Media
Release Date
Windows: November 18, 2002
Genres
Shooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\Bond2.exe True

Install Script

$Display = Get-PrimaryDisplay

New-Item -ItemType Directory -Force -Path "$InstallDirectory\$($env:LOCALAPPDATA)\Gearbox Software\Nightfire"

Copy-Item -Path "$InstallDirectory\ProfileTemplate" -Destination "$($env:LOCALAPPDATA)\Gearbox Software\Nightfire\bond" -Recurse

New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Gearbox Software"
New-Item -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Gearbox Software\Nightfire"
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Gearbox Software\Nightfire" -Name "DisplayWidth" -Value $Display.Bounds.Width -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Gearbox Software\Nightfire" -Name "DisplayHeight" -Value $Display.Bounds.Height -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Gearbox Software\Nightfire" -Name "DisplayDepth" -Value 24 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Gearbox Software\Nightfire" -Name "DisplayRefreshRate" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Gearbox Software\Nightfire" -Name "DisplayMultisampleCount" -Value 0 -Force
New-ItemProperty -Path "registry::\HKEY_CURRENT_USER\SOFTWARE\Gearbox Software\Nightfire" -Name "DisplayVSYNC" -Value 267265 -Force

Name Change Script

if (!Test-Path -Path "$($env:LOCALAPPDATA)\Gearbox Software\Nightfire\bond\config.cfg") {
    Copy-Item -Path "$InstallDirectory\ProfileTemplate\config.cfg" -Destination "$($env:LOCALAPPDATA)\Gearbox Software\Nightfire\bond\config.cfg"
}

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^cl_name "(.+)"' -Substitution "cl_name ""$NewPlayerAlias""" -FilePath "$($env:LOCALAPPDATA)\Gearbox Software\Nightfire\bond"