Deus Ex

From LANCommander
Revision as of 02:08, 6 January 2024 by DoctorDalek (talk | contribs)
Developers
Ion Storm
Publishers
Eidos InteractiveAspyr Media
Release Date
Windows: June 26, 2000
Genres
AdventureShooterRole-playing (RPG)
View at PCGamingWiki

Actions

Name Path Arguments Working Directory Primary
Play DeusEx.exe {InstallDir}/System True

Install Script

# Define the path to the autoexec.cfg file
$filePath = "$InstallDirectory\System\DeusEx.ini"

# Get the screen resolution
Add-Type -AssemblyName System.Windows.Forms
$screen = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Size
$width = $screen.Width
$height= $screen.Height

# Read the content of the file
$content = Get-Content -Path $filePath

# Loop through each line in the file
for ($i = 0; $i -lt $content.Count; $i++) {
    $line = $content[$i]

    # Check if the line contains "SCREENWIDTH" and "640"
    if ($line -like '*FullscreenViewportX*') {
        # Replace the line with the updated width
        $content[$i] = "FullscreenViewportX=$width"
    }
        if ($line -like '*FullscreenViewportY*') {
        # Replace the line with the updated width
        $content[$i] = "FullscreenViewportY=$height"
    }
}

# Save the updated content back to the file
$content | Set-Content -Path $filePath

Name Change Script

Write-ReplaceContentInFile -Pattern '^Name=(.+)' -Substitution "Name=$NewPlayerAlias" -FilePath "$InstallDirectory\System\User.ini"