Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # enter the steam.exe location
- $steamExe = "C:\Program Files (x86)\Steam\Steam.exe"
- # enter the resource file
- $dotoResource = "C:\Program Files (x86)\Steam\SteamApps\common\dota 2 beta\dota\resource\dota_english.txt"
- # verify the steam.exe location is valid
- if (Test-Path $steamExe)
- {
- Write-Host "Found: steam.exe location." -ForegroundColor Green
- }
- else
- {
- Write-Host "`nThe steam.exe location is invalid:" -ForegroundColor Red
- Write-Host "$steamExe" -ForegroundColor Red
- pause
- exit
- }
- # verify the resource location is valid
- if (Test-Path $dotoResource)
- {
- Write-Host "Found: resource file." -ForegroundColor Green
- }
- else
- {
- Write-Host "`nThe ressource file is missing:" -ForegroundColor Red
- Write-Host "$dotoResource" -ForegroundColor Red
- pause
- exit
- }
- Write-Host "`n`nPatching file:" (get-item $dotoResource).Name
- Write-Host "`nReplacing:"
- Write-Host "Windranger -> Windrunner"
- (Get-Content $dotoResource) | Foreach-Object {
- $_ -replace 'Windranger', 'Windrunner' `
- } | Set-Content $dotoResource -Encoding Unicode
- Write-Host "`n`nLaunching dota 2..."
- Start-Process "$steamExe" "steam://rungameid/570"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement