Last active
April 11, 2020 12:56
-
-
Save ml4den/dab3fb521afa606c04cc077eea8a34d6 to your computer and use it in GitHub Desktop.
Easy Fix for Call of Duty Warzone Crashing in PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set path to game: | |
$game = "X:\Games\Warzone\Call of Duty Modern Warfare\ModernWarfare.exe" | |
Write-Host "Please start the game if not already running." -ForegroundColor Yellow | |
Write-Host "$(Get-Date)`tChecking for game process..." | |
Do { | |
$process = Get-Process -Name "ModernWarfare" -ErrorAction SilentlyContinue | |
Start-Sleep 5 | |
} | |
Until ($process) | |
Write-Host "$(Get-Date)`t$($process.ProcessName) is running." | |
if ({Test-Path -Path $game}){ | |
Write-Host "$(Get-Date)`tGiving the game 15 seconds to load..." | |
Start-Sleep 15 | |
Write-Host "$(Get-Date)`Removing file..." | |
Remove-Item $game -Force | |
} else { Write-Host "$(Get-Date)`tGame is already good to go." } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You run the script and then start the game from the launcher.
It checks if the game is running, then gives it some time to load and deletes ModernWarfare.exe if it exists. This has been reported on Reddit to prevent in game crashes for users experiencing them.
You will have to enter the path to your game on line 2 and probably run this as admin.