Need for Speed II

From LANCommander
Developers
EA Canada
Publishers
Electronic Arts
Release Date
Windows: March 31, 1997
Genres
SimulatorRacing
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\nfs2se-gl2.exe True

Install Script

$AppData = [Environment]::GetFolderPath('ApplicationData')

Copy-Item -Path "$InstallDirectory\ProfileTemplate" -Destination "$AppData\.nfs2se" -Recurse

Uninstall Script

$AppData = [Environment]::GetFolderPath('ApplicationData')

Remove-Item "$AppData\.nfs2se" -Recurse -ErrorAction Ignore

Name Change Script

This script patches the config.dat file found in the user's AppData\Roaming\.nfs2se\config folder that is created by the NFSIISE wrapper created by zaps166. The config file has no checksum so modifying the player names is as simple as patching two locations in the binary.

$AppData = [Environment]::GetFolderPath('ApplicationData')

# Converts a string to a UTF16-encoded byte array. This looks like ASCII characters separated by 0x00 in most cases.
$bytes = ConvertTo-StringBytes -Input $NewPlayerAlias -MaxLength 8 -MinLength 8

Edit-PatchBinary -FilePath "$AppData\.nfs2se\config\config.dat" -Offset 228 -Data $bytes
Edit-PatchBinary -FilePath "$AppData\.nfs2se\config\config.dat" -Offset 428 -Data $bytes