SHOW:
|
|
- or go back to the newest paste.
1 | :: Simple script to rename the file ModernWarfare.exe to ModernWarfare1.exe to prevent chrashes | |
2 | @ECHO off | |
3 | :: Change your install path here | |
4 | - | set place=F:\Games\Call of Duty Modern Warfare |
4 | + | set place=C:\Program Files\Call of Duty Modern Warfare |
5 | set PROCNAME="ModernWarfare.exe" | |
6 | ||
7 | :startbattlenet | |
8 | Echo Start Battle.net... | |
9 | "%place%\Modern Warfare Launcher.exe" | |
10 | @ping -n 5 localhost> nul | |
11 | cls | |
12 | :checkstart | |
13 | TaskList|Find "Blizzard Battle.net App" >NUL || If Errorlevel 1 Goto startgame | |
14 | Goto checkstart | |
15 | ||
16 | ||
17 | :startgame | |
18 | echo checking game status... | |
19 | tasklist /FI "IMAGENAME eq %PROCNAME%*" 2>NUL | find /I /N %PROCNAME%>NUL | |
20 | if "%ERRORLEVEL%"=="0" ( | |
21 | Goto gameruns | |
22 | ) | |
23 | cls | |
24 | Goto startgame | |
25 | ||
26 | ||
27 | :exitgame | |
28 | echo checking game status... | |
29 | tasklist /FI "IMAGENAME eq %PROCNAME%*" 2>NUL | find /I /N %PROCNAME%>NUL | |
30 | if "%ERRORLEVEL%"=="0" ( | |
31 | cls | |
32 | Goto exitgame | |
33 | ) | |
34 | cls | |
35 | Goto gamequits | |
36 | ||
37 | :gameruns | |
38 | @ping -n 5 localhost> nul | |
39 | ren "%place%\ModernWarfare.exe" ModernWarfare1.exe >nul | |
40 | if exist "%place%\ModernWarfare1.exe" goto startrenameok | |
41 | echo Oops, something went wrong. Let's try it again | |
42 | @pause | |
43 | goto startgame | |
44 | ||
45 | :startrenameok | |
46 | cls | |
47 | ECHO File renamed successfully! | |
48 | @ping -n 2 localhost> nul | |
49 | ECHO Changing priority... | |
50 | wmic process where name="ModernWarfare.exe" CALL setpriority "normal" >nul | |
51 | ECHO Priority changed to normal | |
52 | @ping -n 3 localhost> nul | |
53 | ECHO Have fun playing | |
54 | @ping -n 5 localhost> nul | |
55 | cls | |
56 | GOTO exitgame | |
57 | ||
58 | :gamequits | |
59 | ren "%place%\ModernWarfare1.exe" ModernWarfare.exe >nul | |
60 | if exist "%place%\ModernWarfare.exe" goto quitrenameok | |
61 | echo Oops, something went wrong. Let's try it again | |
62 | goto startgame | |
63 | ||
64 | :quitrenameok | |
65 | cls | |
66 | ECHO File renamed successfully! | |
67 | ECHO I hope it was fun. | |
68 | GOTO exitscript | |
69 | ||
70 | :exitscript | |
71 | echo. | |
72 | echo Script will be terminated... | |
73 | @ping -n 3 localhost> nul | |
74 | exit |