The Elder Scrolls III: Morrowind

From LANCommander
Developers
Bethesda Game Studios
Publishers
ZeniMax MediaBethesda Softworks
Release Date
Windows: May 1, 2002
Genres
AdventureRole-playing (RPG)
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play {InstallDir}\openmw-launcher.exe True

Install Script

$Documents = [Environment]::GetFolderPath("MyDocuments")

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

$X = $Display.Bounds.Width
$Y = $Display.Bounds.Height

Copy-Item -Path "$InstallDirectory\ProfileTemplate" -Destination "$Documents\My Games\OpenMW" -Recurse

# Use regex to replace text within a file. Quotes are escaped by double quoting ("")
Write-ReplaceContentInFile -Pattern '^resolution x = (.+)' -Substitution "resolution x = $X" -FilePath "$Documents\My Games\OpenMW\settings.cfg"
Write-ReplaceContentInFile -Pattern '^resolution y = (.+)' -Substitution "resolution y = $Y" -FilePath "$Documents\My Games\OpenMW\settings.cfg"

Write-ReplaceContentInFile -Pattern '^data="(.+)"' -Substitution "data=""$InstallDirectory\morrowind\Data Files""" -FilePath "$Documents\My Games\OpenMW\settings.cfg"