Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raspi/266cca9a06351ac8c3d471e54e38dca8 to your computer and use it in GitHub Desktop.
Save raspi/266cca9a06351ac8c3d471e54e38dca8 to your computer and use it in GitHub Desktop.
Remove annoying intro videos from Deus Ex Mankind Divided
# Remove annoying intro videos from Deus Ex Mankind Divided
# Finds DXMD path from registry
# Steam application id (337000 = Deus Ex Mankind Divided)
$steamAppId = 337000
# Empty BINK video
$emptyVideo = @(
0x4B, 0x4E, 0x49, 0x42, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F
)
# Video files to be replaced with empty video
$replaceFiles = @(
"runtime\A25DE802B5F763BC2E933535CD9DC727.pc_binkvid", # AMD
"runtime\5ED546466C171E858CC5A68F29A23284.pc_binkvid", # Eidos Montreal
"runtime\4A0E2951DDC2FCAAB24181DC99805D79.pc_binkvid", # Square Enix
"runtime\61F7622A655F804A87F7991025FADC0C.pc_binkvid", # Nixxes
"runtime\CA6F14742B3E9F4540E4AEA8826D4BA8.pc_binkvid", # Dawn Engine
"runtime\D6303B081E3752D30912AD69F480282D.pc_binkvid" # Deus Ex Universe
)
# Get installation path from registry
$gamePath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App $steamAppId" | Select-Object InstallLocation).InstallLocation
# Replace video files with empty content
foreach ($rf in $replaceFiles) {
$path = Join-Path "$gamePath" "$rf"
$backup = Join-Path "$gamePath" "$rf.backup"
if ((Test-Path "$backup") -eq $false) {
# Rename to .backup
Rename-Item "$path" "$backup"
# Write empty video data
[io.file]::WriteAllBytes($path, $emptyVideo)
}
}
Write-Host "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment