Freelancer

From LANCommander
Revision as of 02:12, 6 January 2024 by DoctorDalek (talk | contribs) (Created new page for Freelancer)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Developers
Digital Anvil
Publishers
Microsoft Game Studios
Release Date
Windows: March 4, 2003
Genres
SimulatorAdventureShooter
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\EXE\Freelancer.exe True
Dedicated Server {InstallDir}\EXE\FLserver.bat False

Install Script

$Documents = [Environment]::GetFolderPath("MyDocuments")
Copy-Item -Path "$InstallDirectory\Freelancer" -Destination "$Documents\My Games\Freelancer" -Recurse

# Bounds are accessible by $Display.Bounds.Width and $Display.Bounds.Height
$Display = Get-PrimaryDisplay

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^size= (.+)' -Substitution "size= $($Display.Bounds.Width), $($Display.Bounds.Height)" -FilePath "$Documents\My Games\Freelancer\PerfOptions.ini"
Write-ReplaceContentInFile -Pattern '^size = (.+)' -Substitution "size = $($Display.Bounds.Width),$($Display.Bounds.Height)" -FilePath "$InstallDirectory\exe\freelancer.ini"

Uninstall Script

$Documents = [Environment]::GetFolderPath("MyDocuments")
Remove-Item -Path "$Documents\My Games\Freelancer" -Recurse -force