Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. @ECHO OFF
  2. SETLOCAL ENABLEDELAYEDEXPANSION
  3. shutdown /A 2>NUL 1>&2
  4. FOR /F %%A IN ('wmic.exe OS GET localdatetime ^| findstr ^[0-9]') DO (SET t0=%%A)
  5. SET Y0=%t0:~0,4%
  6. SET M0=%t0:~4,2%
  7. SET D0=%t0:~6,2%
  8. SET H0=%t0:~8,2%
  9. SET X0=%t0:~10,2%
  10. SET C0=%t0:~12,2%
  11. TITLE Miner-autorun(%Y0%.%M0%.%D0%_%H0%:%X0%:%C0%)
  12. SET Version=1.0.3.4
  13. :hardstart
  14. CLS
  15. COLOR 06
  16. ECHO ==================================================================
  17. ECHO +----------------------------------------------------------------+
  18. ECHO +          AutoRun for EWBF 0.3.4.b Miner - by Fionmb          +
  19. ECHO +                adiomen@gmail.com [v. %Version%]                 +
  20. ECHO +                    Donation deposit adress:                    +
  21. ECHO +            ZEC: t1bsSYxhBxMwDpRSd4tJo9JLfmV7XAiMsWo            +
  22. ECHO +----------------------------------------------------------------+
  23. ECHO ==================================================================
  24. IF "%PROCESSOR_ARCHITECTURE%" == "x86" (
  25.     IF NOT DEFINED PROCESSOR_ARCHITEW6432 (
  26.         ECHO Your OS Architecture is %PROCESSOR_ARCHITECTURE%. Only x64 required.
  27.         PAUSE
  28.         EXIT
  29.     )
  30. )
  31. REM Basic constant
  32. SET FirstRun=0
  33. SET MinerPath=%~dp0
  34. SET ErrorsAmount=5
  35. SET ErrorsCounter=0
  36. SET ConfigErrorsList=/C:"Cannot connect to the pool" /C:"No properly configured pool"
  37. SET InternetErrorsList=/C:"Lost connection" /C:"Cannot resolve hostname"
  38. SET MinerErrorsList=/C:"Thread exited" /C:" 0 Sol/s" /C:"Total speed: 0 Sol/s" /C:"benchmark error" /C:"Api bind error" /C:"CUDA error"
  39. SET OtherErrorsList=/C:"ERROR:"
  40. SET OldHashrate=0
  41. SET HashrateErrorsAmount=0
  42. :checkconfig
  43. IF EXIST config.bat (
  44.     FOR /F "tokens=5 delims= " %%B IN ('findstr /C:"REM Configuration file v." config.bat') DO (
  45.         IF "%%B" == "%Version%" (
  46.             CALL config.bat
  47.             ECHO Config.bat loaded.
  48.             GOTO prestart
  49.         ) ELSE (
  50.             ECHO Your config.bat is out of date.
  51.             CHOICE /C yn /T 15 /D y /M "Delete outdated and create an updated (default) config.bat"
  52.             IF ERRORLEVEL ==2 EXIT
  53.             MOVE /Y config.bat config_backup_%%B.bat 2>NUL 1>&2 && ECHO Created backup of your v. %%B config.bat.
  54.         )
  55.     )
  56. )
  57. ECHO @ECHO off > config.bat
  58. ECHO REM Configuration file v. %Version% >> config.bat
  59. ECHO REM =================================================== [OverClock] >> config.bat
  60. ECHO REM Enable GPU OverClock control monitor (0 - false, 1 - true GIGABYTE, 2 - true MSI, 3 - true ASUS, 4 - true EVGA) >> config.bat
  61. ECHO REM Autorun and run-check of GPU OverClock programs >> config.bat
  62. ECHO SET EnableGPUOverClockControl=0 >> config.bat
  63. ECHO REM Allow restart OverClock programs when miner restarting (1 - true, 0 - false) >> config.bat
  64. ECHO REM Please, do not use this option if it is not needed >> config.bat
  65. ECHO SET AllowRestartGPUOverClock=0 >> config.bat
  66. ECHO REM =================================================== [GPU] >> config.bat
  67. ECHO REM Set how many GPU devices are enabled. >> config.bat
  68. ECHO SET GPUDevicesAmount=0 >> config.bat
  69. ECHO REM Set total average hashrate without overclocking >> config.bat
  70. ECHO SET AverageHashrate=0 >> config.bat
  71. ECHO REM =================================================== [Miner] >> config.bat
  72. ECHO REM Name miner process >> config.bat
  73. ECHO SET MinerProcessProgram=miner.exe>> config.bat
  74. ECHO REM Name miner.log file >> config.bat
  75. ECHO SET MinerProcessLog=miner.log>> config.bat
  76. ECHO REM Use .bat or .exe file to start mining? (1 - .exe, 2 - .bat) >> config.bat
  77. ECHO SET UseBatOrExe=2 >> config.bat
  78. ECHO REM Name miner start .bat file >> config.bat
  79. ECHO SET MinerProcessBat=miner.bat>> config.bat
  80. ECHO REM Set %MinerProcessBat% command here to autocreate this file if it is missing >> config.bat
  81. ECHO SET MinerProcessBatText=miner --server eu1-zcash.flypool.org --port 3333 --user t1bsSYxhBxMwDpRSd4tJo9JLfmV7XAiMsWo.U%t0:~0,14% --pass x --log 2 --fee 2 --templimit 80 --eexit 3 --pec>> config.bat
  82. ECHO REM =================================================== [Timers] >> config.bat
  83. ECHO REM Restart miner every hour (1 - true, 0 - false) >> config.bat
  84. ECHO SET AutoRestartMinerEveryHour=0 >> config.bat
  85. ECHO REM Restart computer every hour (1 - true, 0 - false) >> config.bat
  86. ECHO SET AutoRestartComputerEveryHour=0 >> config.bat
  87. ECHO REM Restart miner every day at 12:00 (1 - true, 0 - false) >> config.bat
  88. ECHO SET AutoRestartMinerAtMidday=0 >> config.bat
  89. ECHO REM Restart computer every day at 12:00 (1 - true, 0 - false) >> config.bat
  90. ECHO SET AutoRestartComputerAtMidday=0 >> config.bat
  91. ECHO REM Restart miner every day at 00:00 (1 - true, 0 - false) >> config.bat
  92. ECHO SET AutoRestartMinerAtMidnight=1 >> config.bat
  93. ECHO REM Restart computer every day at 00:00 (1 - true, 0 - false) >> config.bat
  94. ECHO SET AutoRestartComputerAtMidnight=0 >> config.bat
  95. ECHO REM =================================================== [Other] >> config.bat
  96. ECHO REM Enable double window check (1 - true, 0 - false ) >> config.bat
  97. ECHO SET EnableDoubleWindowCheck=1 >> config.bat
  98. ECHO REM Skip "Begin mining" confirmation (1 - true, 0 - false) >> config.bat
  99. ECHO SET SkipBeginMining=0 >> config.bat
  100. ECHO REM Allow %~n0.bat to restart this computer (1 - true, 0 - false) >> config.bat
  101. ECHO SET AllowRestartComputer=1 >> config.bat
  102. ECHO REM Enable additional environments. Please, do not use this option if it is not needed, or you don't understand what does it mean (1 - true, 0 - false) >> config.bat
  103. ECHO REM GPU_FORCE_64BIT_PTR 0, GPU_MAX_HEAP_SIZE 100, GPU_USE_SYNC_OBJECTS 1, GPU_MAX_ALLOC_PERCENT 100, GPU_SINGLE_ALLOC_PERCENT 100 >> config.bat
  104. ECHO SET EnableGPUEnvironments=0 >> config.bat
  105. ECHO REM =================================================== [AdditionalProgram] >> config.bat
  106. ECHO REM If you need to start another additional program, miner, etc... and check if this program is working, you can use this feature (1 - true, 0 - false) >> config.bat
  107. ECHO SET EnableAUAutorun=0 >> config.bat
  108. ECHO REM Process Name additional program (Press CTRL+ALT+DEL and type Name process) >> config.bat
  109. ECHO SET AUProcessName=minergate.exe>> config.bat
  110. ECHO REM Path + launcher file of additional program >> config.bat
  111. ECHO SET AUProcessPath=C:\Program Files\MinerGate\minergate.exe>> config.bat
  112. ECHO Default config.bat created. Please check it and restart %~n0.bat.
  113. GOTO checkconfig
  114. :restart
  115. COLOR 0C
  116. IF %AllowRestartComputer% EQU 1 (
  117.     CHOICE /C yn /T 60 /D y /M "Restart your computer"
  118.     IF ERRORLEVEL ==2 GOTO hardstart
  119. ) ELSE (
  120.     CHOICE /C yn /T 60 /D n /M "Restart your computer"
  121.     IF ERRORLEVEL ==2 GOTO hardstart
  122. )
  123. tskill /A /V %GPUOverClockTaskName% 2>NUL 1>&2 && ECHO Process %GPUOverClockProcess% was successfuly killed.
  124. IF %EnableGPUOverClockControl% EQU 1 (
  125.     tskill /A /V %GPUOverClockProcessJunk% 2>NUL 1>&2 && ECHO Process %GPUOverClockProcessJunk%.exe was successfuly killed.
  126. )
  127. taskkill /F /IM "%MinerProcessProgram%" 2>NUL 1>&2 && ECHO Process %MinerProcessProgram% was successfuly killed.
  128. IF %EnableAUAutorun% EQU 1 (
  129.     taskkill /F /IM "%AUProcessName%" 2>NUL 1>&2 && ECHO Process %AUProcessName% was successfuly killed.
  130. )
  131. ECHO [%Y1%.%M1%.%D1%][%H1%:%X1%:%C1%] Computer restarting. >> %~n0.log
  132. shutdown /T 60 /R /F
  133. EXIT
  134. :prestart
  135. SET GPUDevicesAmount=%GPUDevicesAmount: =%
  136. SET AverageHashrate=%AverageHashrate: =%
  137. IF %EnableDoubleWindowCheck% EQU 1 (
  138.     tasklist /V /FI "WINDOWTITLE ne Miner-autorun(%Y0%.%M0%.%D0%_%H0%:%X0%:%C0%)" | find /I /N "Miner-autorun" >NUL && GOTO :doublewindow
  139.     GOTO preprestart
  140.     :doublewindow
  141.     ECHO Warning. This is second CMD window of this program. Check it, please.
  142.     ECHO Or try to turn off EnableDoubleWindowCheck option in config.bat.
  143.     CHOICE /C yn /T 10 /D y /M "Exit"
  144.     IF ERRORLEVEL ==2 (
  145.         SET EnableDoubleWindowCheck=0
  146.         GOTO preprestart
  147.     )
  148.     EXIT
  149. )
  150. :preprestart
  151. IF %SkipBeginMining% EQU 0 (
  152.     CHOICE /C yn /T 30 /D y /M "Begin mining"
  153.     IF ERRORLEVEL ==2 EXIT
  154. ) ELSE (
  155.     timeout /T 5 /nobreak >NUL
  156. )
  157. IF %EnableGPUEnvironments% EQU 1 (
  158.     SETX GPU_FORCE_64BIT_PTR 0 2>NUL 1>&2 && ECHO GPU_FORCE_64BIT_PTR 0
  159.     SETX GPU_MAX_HEAP_SIZE 100 2>NUL 1>&2 && ECHO GPU_MAX_HEAP_SIZE 100
  160.     SETX GPU_USE_SYNC_OBJECTS 1 2>NUL 1>&2 && ECHO GPU_USE_SYNC_OBJECTS 1
  161.     SETX GPU_MAX_ALLOC_PERCENT 100 2>NUL 1>&2 && ECHO GPU_MAX_ALLOC_PERCENT 100
  162.     SETX GPU_SINGLE_ALLOC_PERCENT 100 2>NUL 1>&2 && ECHO GPU_SINGLE_ALLOC_100
  163. ) ELSE (
  164.     REG DELETE HKCU\Environment /F /V GPU_FORCE_64BIT_PTR 2>NUL 1>&2 && ECHO GPU_FORCE_64BIT_PTR successfuly removed from environments.
  165.     REG DELETE HKCU\Environment /F /V GPU_MAX_HEAP_SIZE 2>NUL 1>&2 && ECHO GPU_MAX_HEAP_SIZE successfuly removed from environments.
  166.     REG DELETE HKCU\Environment /F /V GPU_USE_SYNC_OBJECTS 2>NUL 1>&2 && ECHO GPU_USE_SYNC_OBJECTS successfuly removed from environments.
  167.     REG DELETE HKCU\Environment /F /V GPU_MAX_ALLOC_PERCENT 2>NUL 1>&2 && ECHO GPU_MAX_ALLOC_PERCENT successfuly removed from environments.
  168.     REG DELETE HKCU\Environment /F /V GPU_SINGLE_ALLOC_PERCENT 2>NUL 1>&2 && ECHO GPU_SINGLE_ALLOC_PERCENT successfuly removed from environments.
  169. )
  170. :start
  171. FOR /F %%C IN ('wmic.exe OS GET localdatetime ^| findstr ^[0-9]') DO (SET t1=%%C)
  172. SET Y1=%t1:~0,4%
  173. SET M1=%t1:~4,2%
  174. SET D1=%t1:~6,2%
  175. SET H1=%t1:~8,2%
  176. SET X1=%t1:~10,2%
  177. SET C1=%t1:~12,2%
  178. SET /A s1=H1*60*60*100+X1*60*100+C1*100
  179. IF %AllowRestartComputer% EQU 0 (
  180.     IF %AutoRestartComputerEveryHour% NEQ 0 ECHO Computer restart is denied. Check and reconfigure AutoRestartComputerEveryHour in your config.bat.
  181.     IF %AutoRestartComputerAtMidday% NEQ 0 ECHO Computer restart is denied. Check and reconfigure AutoRestartComputerAtMidday in your config.bat.
  182.     IF %AutoRestartComputerAtMidnight% NEQ 0 ECHO Computer restart is denied. Check and reconfigure AutoRestartComputerAtMidnight in your config.bat.
  183.     SET AutoRestartComputerEveryHour=0
  184.     SET AutoRestartComputerAtMidday=0
  185.     SET AutoRestartComputerAtMidnight=0
  186. )
  187. IF %EnableGPUOverClockControl% GEQ 0 (
  188.     IF %EnableGPUOverClockControl% EQU 0 (
  189.         ECHO OverClock control monitor is disabled.
  190.     ) ELSE (
  191.         IF %AverageHashrate% EQU 0 (
  192.             ECHO Error. Average hashrate = 0. Configure it, please.
  193.             ECHO GPUOverClockControl will be disabled...
  194.             SET EnableGPUOverClockControl=0
  195.         )
  196.     )
  197.     IF %EnableGPUOverClockControl% GTR 4 (
  198.         ECHO Warning. Wrong parameter of EnableGPUOverClockControl, only [0-4] are required. Configure it, please.
  199.         SET EnableGPUOverClockControl=0
  200.     )
  201.     IF %EnableGPUOverClockControl% EQU 1 (
  202.     SET GPUOverClockTaskName=Xtreme
  203.     SET GPUOverClockProcess=Xtreme.exe
  204.     SET GPUOverClockProcessJunk=loading
  205.     SET GPUOverClockPath="C:\Program Files (x86)\GIGABYTE\XTREME GAMING ENGINE\Launcher.exe"
  206.         IF NOT EXIST "C:\Program Files (x86)\GIGABYTE\XTREME GAMING ENGINE" (
  207.             ECHO Warning. Wrong path to Gigabyte Xtreme OC, use default install path. Check it, please.
  208.             ECHO GPUOverClockControl will be disabled...
  209.             SET EnableGPUOverClockControl=0
  210.         )
  211.     )
  212.     IF %EnableGPUOverClockControl% EQU 2 (
  213.     SET GPUOverClockTaskName=MSIAfterburner
  214.     SET GPUOverClockProcess=MSIAfterburner.exe
  215.     SET GPUOverClockPath="C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe"
  216.         IF NOT EXIST "C:\Program Files (x86)\MSI Afterburner" (
  217.             ECHO Warning. Wrong path to MSI Afterburner OC, use default install path. Check it, please.
  218.             ECHO GPUOverClockControl will be disabled...
  219.             SET EnableGPUOverClockControl=0
  220.         )
  221.     )
  222.     IF %EnableGPUOverClockControl% EQU 3 (
  223.     SET GPUOverClockTaskName=GPUTweakII
  224.     SET GPUOverClockProcess=GPUTweakII.exe
  225.     SET GPUOverClockPath="C:\Program Files (x86)\ASUS\GPU TweakII\GPUTweakII.exe"
  226.         IF NOT EXIST "C:\Program Files (x86)\ASUS\GPU TweakII" (
  227.             ECHO Warning. Wrong path to ASUS GPU TweakII OC, use default install path. Check it, please.
  228.             ECHO GPUOverClockControl will be disabled...
  229.             SET EnableGPUOverClockControl=0
  230.         )
  231.     )
  232.     IF %EnableGPUOverClockControl% EQU 4 (
  233.     SET GPUOverClockTaskName=PrecisionX_x64
  234.     SET GPUOverClockProcess=PrecisionX_x64.exe
  235.     SET GPUOverClockPath="C:\Program Files (x86)\EVGA\Precision XOC\PrecisionX_x64.exe"
  236.         IF NOT EXIST "C:\Program Files (x86)\EVGA\Precision XOC\" (
  237.             ECHO Warning. Wrong path to EVGA Precision X OC, use default install path. Check it, please.
  238.             ECHO GPUOverClockControl will be disabled...
  239.             SET EnableGPUOverClockControl=0
  240.         )
  241.     )
  242. ) ELSE (
  243.     ECHO Warning. Wrong parameter of EnableGPUOverClockControl, only [0-4] are required. Configure it, please.
  244.     SET EnableGPUOverClockControl=0
  245. )
  246. IF NOT EXIST "%MinerProcessProgram%" (
  247.     ECHO Error. %MinerPath%miner.exe is missing. Check it, please.
  248.     PAUSE
  249.     EXIT
  250. )
  251. IF NOT EXIST "cudart32_80.dll" (
  252.     ECHO Error. %MinerPath%cudart32_80.dll is missing. Check it, please.
  253.     PAUSE
  254.     EXIT
  255. )
  256. IF NOT EXIST "cudart64_80.dll" (
  257.     ECHO Error. %MinerPath%cudart64_80.dll is missing. Check it, please.
  258.     PAUSE
  259.     EXIT
  260. )
  261. IF EXIST "Logs" (
  262.     ECHO Folder Logs exist.
  263. ) ELSE (
  264.     MD Logs && ECHO Folder Logs created.
  265. )
  266. COLOR 06
  267. IF %EnableAUAutorun% EQU 1 (
  268.     tasklist /FI "IMAGENAME eq %AUProcessName%" 2>NUL | find /I /N "%AUProcessName%" >NUL
  269.     IF ERRORLEVEL ==1 (
  270.         START /MIN "" "%AUProcessPath%" && ECHO %AUProcessName% is started at %H1%:%X1%:%C1% %Y1%.%M1%.%D1%.
  271.         ECHO [%Y1%.%M1%.%D1%][%H1%:%X1%:%C1%] %AUProcessName% is started. >> %~n0.log
  272.         timeout /T 5 /nobreak >NUL
  273.     )
  274. )
  275. IF %EnableGPUOverClockControl% GEQ 1 (
  276.     IF %AllowRestartGPUOverClock% EQU 1 (
  277.         IF %FirstRun% EQU 1 (
  278.             tskill /A /V %GPUOverClockTaskName% 2>NUL 1>&2 && ECHO Process %GPUOverClockProcess% was successfuly killed.
  279.             IF %EnableGPUOverClockControl% EQU 1 (
  280.                 tskill /A /V %GPUOverClockProcessJunk% 2>NUL 1>&2 && ECHO Process %GPUOverClockProcessJunk%.exe was successfuly killed.
  281.             )
  282.             timeout /T 5 /nobreak >NUL
  283.         )
  284.     )
  285.     tasklist /FI "IMAGENAME eq %GPUOverClockProcess%" 2>NUL | find /I /N "%GPUOverClockProcess%" >NUL
  286.     IF ERRORLEVEL ==1 (
  287.         START /MIN "" %GPUOverClockPath% && ECHO %GPUOverClockProcess% is started at %H1%:%X1%:%C1% %Y1%.%M1%.%D1%.
  288.         ECHO [%Y1%.%M1%.%D1%][%H1%:%X1%:%C1%] %GPUOverClockProcess% is started. >> %~n0.log
  289.         timeout /T 5 /nobreak >NUL
  290.     )
  291. )
  292. taskkill /F /IM "%MinerProcessProgram%" 2>NUL 1>&2 && ECHO Process %MinerProcessProgram% was successfuly killed.
  293. timeout /T 5 /nobreak >NUL
  294. taskkill /F /FI "IMAGENAME eq cmd.exe" /FI "WINDOWTITLE eq %MinerProcessBat%*" 2>NUL 1>&2
  295. timeout /T 5 /nobreak >NUL
  296. IF EXIST %MinerProcessLog% MOVE /Y %MinerProcessLog% Logs\miner_%Y1%.%M1%.%D1%_%H1%.%X1%.%C1%.log 2>NUL 1>&2
  297. IF ERRORLEVEL ==1 (
  298.     ECHO Error. Can't rename, move or open %MinerProcessLog%. Check it, please.
  299.     CHOICE /C yn /T 10 /D y /M "Try to delete %MinerProcessLog%"
  300.     IF ERRORLEVEL ==2 (
  301.         ECHO [%Y1%.%M1%.%D1%][%H1%:%X1%:%C1%] Error. Can't rename, move or open %MinerProcessLog%. Check it, please. >> %~n0.log
  302.     ) ELSE (
  303.         DEL /Q /F %MinerProcessLog% 2>NUL 1>&2 && ECHO %MinerProcessLog% deleted successfuly. Continue...
  304.     )
  305. ) ELSE (
  306.     ECHO %MinerProcessLog% renamed and moved to Logs folder.
  307. )
  308. timeout /T 5 /nobreak >NUL
  309. IF %UseBatOrExe% EQU 1 (
  310.     IF NOT EXIST "miner.cfg" (
  311.         FOR /F "tokens=3,5,7,9 delims= " %%W IN ("%MinerProcessBatText%") DO (
  312.             ECHO # Common parameters > miner.cfg
  313.             ECHO # All the parameters here are similar to the command line arguments >> miner.cfg
  314.             ECHO. >> miner.cfg
  315.             ECHO [common] >> miner.cfg
  316.             ECHO cuda_devices 0 1 2 3 4 5 6 7 >> miner.cfg
  317.             ECHO intensity    64 64 64 64 64 64 64 64 >> miner.cfg
  318.             ECHO templimit    80 >> miner.cfg
  319.             ECHO pec          1 >> miner.cfg
  320.             ECHO boff         0 >> miner.cfg
  321.             ECHO eexit        3 >> miner.cfg
  322.             ECHO tempunits    c >> miner.cfg
  323.             ECHO log          2 >> miner.cfg
  324.             ECHO logfile      miner.log >> miner.cfg
  325.             ECHO api          127.0.0.1:42000 >> miner.cfg
  326.             ECHO. >> miner.cfg
  327.             ECHO # The miner start work from this server >> miner.cfg
  328.             ECHO # When the server is fail, the miner will try to reconnect 3 times >> miner.cfg >> miner.cfg
  329.             ECHO # After three unsuccessful attempts, the miner will switch to the next server >> miner.cfg
  330.             ECHO # You can add up to 8 servers >> miner.cfg
  331.             ECHO. >> miner.cfg
  332.             ECHO # main server >> miner.cfg
  333.             ECHO [server] >> miner.cfg
  334.             ECHO server %%W >> miner.cfg
  335.             ECHO port   %%X >> miner.cfg
  336.             ECHO user   %%Y >> miner.cfg
  337.             ECHO pass   %%Z >> miner.cfg
  338.             ECHO. >> miner.cfg
  339.             ECHO # additional server 1 >> miner.cfg
  340.             ECHO [server] >> miner.cfg
  341.             ECHO server eu1-zcash.flypool.org >> miner.cfg
  342.             ECHO port   3333 >> miner.cfg
  343.             ECHO user   t1bsSYxhBxMwDpRSd4tJo9JLfmV7XAiMsWo.U%t0:~0,14% >> miner.cfg
  344.             ECHO pass   x >> miner.cfg
  345.             ECHO. >> miner.cfg
  346.             ECHO # additional server 2 >> miner.cfg
  347.             ECHO [server] >> miner.cfg
  348.             ECHO server zec-eu1.nanopool.org >> miner.cfg
  349.             ECHO port   6666 >> miner.cfg
  350.             ECHO user   t1bsSYxhBxMwDpRSd4tJo9JLfmV7XAiMsWo.t >> miner.cfg
  351.             ECHO pass   x >> miner.cfg
  352.             ECHO miner.cfg created... Check it, please.
  353.         )
  354.     )
  355.     IF NOT EXIST %MinerProcessProgram% (
  356.         ECHO %MinerProcessProgram% is missing, mining is impossible.
  357.         PAUSE
  358.         EXIT
  359.     )
  360.     START /MIN %MinerProcessProgram% && ECHO Miner is started at %H1%:%X1%:%C1% %Y1%.%M1%.%D1%.
  361.     ECHO [%Y1%.%M1%.%D1%][%H1%:%X1%:%C1%] Miner is started. Autorun v. %Version%. >> %~n0.log
  362. ) ELSE (
  363.     IF NOT EXIST %MinerProcessBat% (
  364.         ECHO TITLE %MinerProcessBat% > %MinerProcessBat%
  365.         ECHO %MinerProcessBatText% >> %MinerProcessBat%
  366.         ECHO EXIT >> %MinerProcessBat%
  367.         ECHO %MinerProcessBat% created... Check it, please.
  368.         GOTO start
  369.     )
  370.     START /MIN "%MinerProcessBat%" %MinerProcessBat% && ECHO Miner is started at %H1%:%X1%:%C1% %Y1%.%M1%.%D1%.
  371.     ECHO [%Y1%.%M1%.%D1%][%H1%:%X1%:%C1%] Miner is started. Autorun v. %Version%. >> %~n0.log
  372. )
  373. timeout /T 5 /nobreak >NUL
  374. IF NOT EXIST %MinerProcessLog% (
  375.     ECHO Error. %MinerProcessLog% is missing. Check it, please.
  376.     IF %UseBatOrExe% EQU 2 (
  377.         ECHO Check "--log 2" option in your %MinerProcessBat% file.
  378.         CHOICE /C yn /T 30 /D y /M "Create default %MinerProcessBat%"
  379.         IF ERRORLEVEL ==2 (
  380.             ECHO [%Y1%.%M1%.%D1%][%H1%:%X1%:%C1%] Error. %MinerProcessLog% is missing. Check it, please. >> %~n0.log
  381.             ECHO [%Y1%.%M1%.%D1%][%H1%:%X1%:%C1%] Check "--log 2" option in your %MinerProcessBat% file. >> %~n0.log
  382.         ) ELSE (
  383.             ECHO TITLE %MinerProcessBat% > %MinerProcessBat%
  384.             ECHO %MinerProcessBatText% >> %MinerProcessBat%
  385.             ECHO EXIT >> %MinerProcessBat%
  386.             ECHO %MinerProcessBat% created... Check it, please.
  387.             GOTO start
  388.         )
  389.     ) ELSE (
  390.         ECHO Check "log 2" option in your miner.cfg file.
  391.         CHOICE /C yn /T 30 /D y /M "Create default miner.cfg"
  392.         IF ERRORLEVEL ==2 (
  393.             ECHO [%Y1%.%M1%.%D1%][%H1%:%X1%:%C1%] Error. %MinerProcessLog% is missing. Check it, please. >> %~n0.log
  394.             ECHO [%Y1%.%M1%.%D1%][%H1%:%X1%:%C1%] Check "log 2" option in your miner.cfg file. >> %~n0.log
  395.         ) ELSE (
  396.             DEL /Q /F miner.cfg 2>NUL 1>&2
  397.             GOTO start
  398.         )
  399.     )
  400. ) ELSE (
  401.     ECHO Connected to %MinerProcessLog%. Start reading...
  402. )
  403. SET FirstRun=0
  404. :check
  405. COLOR 02
  406. timeout /T 5 /nobreak >NUL
  407. FOR /F %%D IN ('wmic.exe OS GET localdatetime ^| findstr ^[0-9]') DO (SET t2=%%D)
  408. SET Y2=%t2:~0,4%
  409. SET M2=%t2:~4,2%
  410. SET D2=%t2:~6,2%
  411. SET H2=%t2:~8,2%
  412. SET X2=%t2:~10,2%
  413. SET C2=%t2:~12,2%
  414. SET /A s2=H2*60*60*100+X2*60*100+C2*100
  415. IF %D2% GTR %D1% (
  416.     SET /A days=D2-D1
  417.     SET /A s3=^(days*8640000^)-s1
  418. ) ELSE (
  419.     IF %M2% NEQ %M1% (
  420.         ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Miner must be restarted, please wait. >> %~n0.log
  421.         COLOR 06
  422.         ECHO ==================================================================
  423.         ECHO +----------------------------------------------------------------+
  424.         ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  425.         ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  426.         ECHO + Warning. Miner must be restarted, please wait...               +
  427.         ECHO +----------------------------------------------------------------+
  428.         ECHO ==================================================================
  429.         GOTO hardstart
  430.     )
  431.     IF %s2% GEQ %s1% (SET /A s3=s2-s1) ELSE (SET /A s3=s1-s2)
  432. )
  433. SET /A t3_h=s3/100/60/60
  434. SET /A t3_m=s3 %% ^(100*60*60^)/100/60
  435. SET /A t3_s=s3 %% ^(100*60^)/100
  436. IF %t3_h% LSS 10 (SET t3_h=0%t3_h%) ELSE (SET t3_h=%t3_h%)
  437. IF %t3_m% LSS 10 (SET t3_m=0%t3_m%) ELSE (SET t3_m=%t3_m%)
  438. IF %t3_s% LSS 10 (SET t3_s=0%t3_s%) ELSE (SET t3_s=%t3_s%)
  439. SET t3=%t3_h%:%t3_m%:%t3_s%
  440. IF %D2% NEQ %D1% (
  441.     IF %AutoRestartComputerAtMidnight% EQU 1 (
  442.         ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Computer midnight restart, please wait. Miner works %t3% >> %~n0.log
  443.         COLOR 06
  444.         ECHO ==================================================================
  445.         ECHO +----------------------------------------------------------------+
  446.         ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  447.         ECHO + Miner works %t3%                                           +
  448.         ECHO + Warning. Computer midnight restart, please wait...             +
  449.         ECHO +----------------------------------------------------------------+
  450.         ECHO ==================================================================
  451.         GOTO restart
  452.     ) ELSE (
  453.         IF %AutoRestartMinerAtMidnight% EQU 1 (
  454.             ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Miner midnight restart, please wait. Miner works %t3% >> %~n0.log
  455.             COLOR 06
  456.             ECHO ==================================================================
  457.             ECHO +----------------------------------------------------------------+
  458.             ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  459.             ECHO + Miner works %t3%                                           +
  460.             ECHO + Warning. Miner midnight restart, please wait...                +
  461.             ECHO +----------------------------------------------------------------+
  462.             ECHO ==================================================================
  463.             GOTO start
  464.         )
  465.     )
  466. )
  467. IF %AutoRestartComputerEveryHour% EQU 1 (
  468.     IF "%X2%" == "00" (
  469.         ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Computer every hour restart, please wait. Miner works %t3% >> %~n0.log
  470.         COLOR 06
  471.         ECHO ==================================================================
  472.         ECHO +----------------------------------------------------------------+
  473.         ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  474.         ECHO + Miner works %t3%                                           +
  475.         ECHO + Warning. Computer every hour restart, please wait...           +
  476.         ECHO +----------------------------------------------------------------+
  477.         ECHO ==================================================================
  478.         GOTO restart
  479.     )
  480. ) ELSE (
  481.     IF %AutoRestartMinerEveryHour% EQU 1 (
  482.         IF "%X2%" == "00" (
  483.             ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Miner every hour restart, please wait. Miner works %t3% >> %~n0.log
  484.             COLOR 06
  485.             ECHO ==================================================================
  486.             ECHO +----------------------------------------------------------------+
  487.             ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  488.             ECHO + Miner works %t3%                                           +
  489.             ECHO + Warning. Miner every hour restart, please wait...              +
  490.             ECHO +----------------------------------------------------------------+
  491.             ECHO ==================================================================
  492.             GOTO start
  493.         )
  494.     )
  495.     IF %AutoRestartComputerAtMidday% EQU 1 (
  496.         IF "%H2%%X2%" == "1200" (
  497.             ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Computer midday restart, please wait. Miner works %t3% >> %~n0.log
  498.             COLOR 06
  499.             ECHO ==================================================================
  500.             ECHO +----------------------------------------------------------------+
  501.             ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  502.             ECHO + Miner works %t3%                                           +
  503.             ECHO + Warning. Computer midday restart, please wait...               +
  504.             ECHO +----------------------------------------------------------------+
  505.             ECHO ==================================================================
  506.             GOTO restart
  507.         )
  508.     ) ELSE (
  509.         IF %AutoRestartMinerAtMidday% EQU 1 (
  510.             IF "%H2%%X2%" == "1200" (
  511.                 ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Miner midday restart, please wait. Miner works %t3% >> %~n0.log
  512.                 COLOR 06
  513.                 ECHO ==================================================================
  514.                 ECHO +----------------------------------------------------------------+
  515.                 ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  516.                 ECHO + Miner works %t3%                                           +
  517.                 ECHO + Warning. Miner midday restart, please wait...                  +
  518.                 ECHO +----------------------------------------------------------------+
  519.                 ECHO ==================================================================
  520.                 GOTO start
  521.             )
  522.         )
  523.     )
  524. )
  525. IF %ErrorsCounter% GEQ %ErrorsAmount% (
  526.     ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Too many errors, need clear GPU cash. Miner works %t3% >> %~n0.log
  527.     COLOR 0C
  528.     ECHO ==================================================================
  529.     ECHO +----------------------------------------------------------------+
  530.     ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  531.     ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  532.     ECHO + Miner works %t3%                                           +
  533.     ECHO + Warning. Too many errors, need clear GPU cash.                 +
  534.     ECHO + Computer restarting...                                         +
  535.     ECHO +----------------------------------------------------------------+
  536.     ECHO ==================================================================
  537.     GOTO restart
  538. )
  539. IF %AverageHashrate% GTR 0 (
  540.     timeout /T 5 /nobreak >NUL
  541.     FOR /F "tokens=3 delims= " %%E IN ('findstr /R /C:"Total speed: [0-9]* Sol/s" %MinerProcessLog%') DO (
  542.         IF %%E LSS %AverageHashrate% (
  543.             IF %%E GEQ 1 (
  544.                 IF %OldHashrate% NEQ %%E (
  545.                     IF %EnableGPUOverClockControl% NEQ 0 (
  546.                         tasklist /FI "IMAGENAME eq %GPUOverClockProcess%" 2>NUL | find /I /N "%GPUOverClockProcess%" >NUL
  547.                         IF ERRORLEVEL ==1 (
  548.                             ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Error. Process %GPUOverClockProcess% crashed. Miner works %t3% >> %~n0.log
  549.                             COLOR 0C
  550.                             SET /A ErrorsCounter+=1
  551.                             ECHO ==================================================================
  552.                             ECHO +----------------------------------------------------------------+
  553.                             ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  554.                             ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  555.                             ECHO + Miner works %t3%                                           +
  556.                             IF %EnableGPUOverClockControl% EQU 1 (
  557.                                 ECHO + Error. Process %GPUOverClockProcess% crashed...                           +
  558.                             )
  559.                             IF %EnableGPUOverClockControl% EQU 2 (
  560.                                 ECHO + Error. Process %GPUOverClockProcess% crashed...                   +
  561.                             )
  562.                             IF %EnableGPUOverClockControl% EQU 3 (
  563.                                 ECHO + Error. Process %GPUOverClockProcess% crashed...                       +
  564.                             )
  565.                             ECHO + Miner and GPU OC program restarting...                         +
  566.                             ECHO +----------------------------------------------------------------+
  567.                             ECHO ==================================================================
  568.                             GOTO start
  569.                         )
  570.                     )
  571.                     IF %HashrateErrorsAmount% GEQ 20 (
  572.                         ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Low Hashrate. Miner works %t3% >> %~n0.log
  573.                         COLOR 0C
  574.                         ECHO ==================================================================
  575.                         ECHO +----------------------------------------------------------------+
  576.                         ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  577.                         ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  578.                         ECHO + Miner works %t3%                                           +
  579.                         ECHO + Warning. Low Hashrate...                                       +
  580.                         ECHO + Computer restarting...                                         +
  581.                         ECHO +----------------------------------------------------------------+
  582.                         ECHO ==================================================================
  583.                         GOTO restart
  584.                     )
  585.                     ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Check your hashrate. [%%E/%AverageHashrate%]
  586.                     ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Warning. Check your hashrate. [%%E/%AverageHashrate%] >> %~n0.log
  587.                     SET OldHashrate=%%E
  588.                     SET /A HashrateErrorsAmount+=1
  589.                 )
  590.             )
  591.         )
  592.     )
  593. )
  594. timeout /T 5 /nobreak >NUL
  595. FOR /F "delims=" %%F IN ('findstr %ConfigErrorsList% %InternetErrorsList% %MinerErrorsList% %OtherErrorsList% %MinerProcessLog%') DO (
  596. COLOR 0C
  597. IF %FirstRun% EQU 0 (
  598.     ECHO %%F | findstr %ConfigErrorsList% 2>NUL && (
  599.         ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Error. Carefully configure config.bat, miner.cfg or/and %MinerProcessBat% >> %~n0.log
  600.         ECHO %%F >> %~n0.log
  601.         ECHO ==================================================================
  602.         ECHO +----------------------------------------------------------------+
  603.         ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  604.         ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  605.         ECHO + Carefully configure config.bat, miner.cfg or/and %MinerProcessBat%     +
  606.         ECHO + Miner restarting with default values...                        +
  607.         ECHO +----------------------------------------------------------------+
  608.         ECHO ==================================================================
  609.         CHOICE /C yn /T 30 /D y /M "Create default %MinerProcessBat% and continue mining"
  610.         IF ERRORLEVEL ==2 EXIT
  611.         taskkill /F /IM "%MinerProcessProgram%" 2>NUL 1>&2
  612.         taskkill /F /FI "IMAGENAME eq cmd.exe" /FI "WINDOWTITLE eq %MinerProcessBat%*" 2>NUL 1>&2
  613.         SET UseBatOrExe=2
  614.         timeout /T 5 /nobreak >NUL
  615.         ECHO TITLE %MinerProcessBat% > %MinerProcessBat%
  616.         ECHO miner --server eu1-zcash.flypool.org --port 3333 --user t1bsSYxhBxMwDpRSd4tJo9JLfmV7XAiMsWo.U%t0:~0,14% --pass x --log 2 --fee 2 --templimit 80 --eexit 3 --pec>> %MinerProcessBat%
  617.         ECHO EXIT >> %MinerProcessBat%
  618.         ECHO Default %MinerProcessBat% created... Check it, please.
  619.         GOTO start
  620.     )
  621. )
  622. ECHO %%F | findstr %InternetErrorsList% 2>NUL && (
  623.     ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Error. Something wrong with Internet. Check it, please. Miner works %t3% >> %~n0.log
  624.     ECHO %%F >> %~n0.log
  625.     ECHO ==================================================================
  626.     ECHO +----------------------------------------------------------------+
  627.     ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  628.     ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  629.     ECHO + Miner works %t3%                                           +
  630.     ECHO + Something wrong with Internet...                               +
  631.     ECHO + Waiting 12 minutes...                                          +
  632.     ECHO +----------------------------------------------------------------+
  633.     ECHO ==================================================================
  634.     CHOICE /C yn /T 660 /D y /M "Restart miner"
  635.     IF ERRORLEVEL ==2 EXIT
  636.     IF EXIST "Logs\miner_*.log" (
  637.         CHOICE /C yn /T 60 /D n /M "Clean %MinerPath%Logs folder now"
  638.         IF ERRORLEVEL ==2 (
  639.             SET /A ErrorsCounter+=1
  640.             GOTO start
  641.         )
  642.         DEL /F /Q "Logs\*" && ECHO Clean %MinerPath%Logs finished.
  643.     )
  644.     GOTO start
  645. )
  646. ECHO %%F | findstr %MinerErrorsList% 2>NUL && (
  647.     ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Error. Something wrong with GPU, Voltage or OverClock. Miner works %t3% >> %~n0.log
  648.     ECHO %%F >> %~n0.log
  649.     ECHO ==================================================================
  650.     ECHO +----------------------------------------------------------------+
  651.     ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  652.     ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  653.     ECHO + Miner works %t3%                                           +
  654.     ECHO + Something wrong with GPU, Voltage or OC...                     +
  655.     ECHO + Miner restarting...                                            +
  656.     ECHO +----------------------------------------------------------------+
  657.     ECHO ==================================================================
  658.     SET /A ErrorsCounter+=1
  659.     GOTO start
  660.     )
  661. ECHO %%F | findstr %OtherErrorsList% 2>NUL && (
  662.     ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Error. New error found. Miner works %t3% >> %~n0.log
  663.     ECHO %%F >> %~n0.log
  664.     ECHO ==================================================================
  665.     ECHO +----------------------------------------------------------------+
  666.     ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  667.     ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  668.     ECHO + Miner works %t3%                                           +
  669.     ECHO + New error found...                                             +
  670.     ECHO + Miner restarting...                                            +
  671.     ECHO +----------------------------------------------------------------+
  672.     ECHO ==================================================================
  673.     SET /A ErrorsCounter+=1
  674.     GOTO start
  675.     )
  676. )
  677. timeout /T 5 /nobreak >NUL
  678. tasklist /FI "IMAGENAME eq %MinerProcessProgram%" 2>NUL | find /I /N "%MinerProcessProgram%" >NUL
  679. IF ERRORLEVEL ==1 (
  680.     ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Error. Process %MinerProcessProgram% crashed. Miner works %t3% >> %~n0.log
  681.     COLOR 0C
  682.     ECHO ==================================================================
  683.     ECHO +----------------------------------------------------------------+
  684.     ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  685.     ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  686.     ECHO + Miner works %t3%                                           +
  687.     ECHO + Error. Process %MinerProcessProgram% crashed...                            +
  688.     ECHO + Miner restarting...                                            +
  689.     ECHO +----------------------------------------------------------------+
  690.     ECHO ==================================================================
  691.     GOTO start
  692. )
  693. IF %EnableAUAutorun% EQU 1 (
  694.     timeout /T 5 /nobreak >NUL
  695.     tasklist /FI "IMAGENAME eq %AUProcessName%" 2>NUL | find /I /N "%AUProcessName%" >NUL
  696.     IF ERRORLEVEL ==1 (
  697.         ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Error. %AUProcessName% crashed. Miner works %t3% >> %~n0.log
  698.         COLOR 0C
  699.         ECHO ==================================================================
  700.         ECHO +----------------------------------------------------------------+
  701.         ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  702.         ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  703.         ECHO + Miner works %t3%                                           +
  704.         ECHO + Error. Additional program crashed...                           +
  705.         ECHO + Miner restarting...                                            +
  706.         ECHO +----------------------------------------------------------------+
  707.         ECHO ==================================================================
  708.         CHOICE /C yn /T 15 /D n /M "You do it manualy"
  709.         IF ERRORLEVEL ==2 (
  710.             GOTO start
  711.         ) ELSE (
  712.             ECHO Ok. I turn off Additional program check... Continue mining...
  713.             SET EnableAUAutorun=0
  714.             GOTO start
  715.         )
  716.     )
  717. )
  718. IF %FirstRun% EQU 0 (
  719.     SET /A GPUCount=0
  720.     IF %GPUDevicesAmount% GEQ 1 (
  721.         FOR /F "delims=" %%G IN ('findstr /R /C:"CUDA: Device: [0-9]* .* PCI: .*" %MinerProcessLog%') DO (SET /A GPUCount+=1)
  722.         IF %GPUDevicesAmount% NEQ !GPUCount! (
  723.             ECHO [%Y2%.%M2%.%D2%][%H2%:%X2%:%C2%] Error. Something wrong with GPU, failed load all GPU. Amount of GPU [!GPUCount!/%GPUDevicesAmount%]. Miner works %t3% >> %~n0.log
  724.             COLOR 0C
  725.             ECHO ==================================================================
  726.             ECHO +----------------------------------------------------------------+
  727.             ECHO + Now %Y2%.%M2%.%D2% %H2%:%X2%                                           +
  728.             ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  729.             ECHO + Miner works %t3%                                           +
  730.             ECHO + Something wrong with GPU, failed load all GPU.                 +
  731.             ECHO + Amount of GPU: [!GPUCount!/%GPUDevicesAmount%]                                           +
  732.             ECHO + Computer restarting...                                         +
  733.             ECHO +----------------------------------------------------------------+
  734.             ECHO ==================================================================
  735.             GOTO restart
  736.         )
  737.     ) ELSE (
  738.         ECHO GPU activated check is disabled.
  739.     )
  740.     COLOR 02
  741.     ECHO ==================================================================
  742.     ECHO +----------------------------------------------------------------+
  743.     ECHO + Miner was started at %Y1%.%M1%.%D1% %H1%:%X1%                          +
  744.     ECHO + Process %MinerProcessProgram% is running - don't worry                     +
  745.     IF %EnableGPUOverClockControl% NEQ 0 (
  746.         IF %EnableGPUOverClockControl% EQU 1 (
  747.             ECHO + Process %GPUOverClockProcess% is running...                               +
  748.         )
  749.         IF %EnableGPUOverClockControl% EQU 2 (
  750.             ECHO + Process %GPUOverClockProcess% is running...                       +
  751.         )
  752.         IF %EnableGPUOverClockControl% EQU 3 (
  753.             ECHO + Process %GPUOverClockProcess% is running...                           +
  754.         )
  755.         IF %EnableGPUOverClockControl% GEQ 4 (
  756.             ECHO + GPU OverClock monitor: Wrong config.                           +
  757.         )
  758.     ) ELSE (
  759.         ECHO + GPU OverClock monitor: Disabled                                +
  760.     )
  761.     IF %AllowRestartComputer% EQU 1 (
  762.         ECHO + Restart computer: Allowed                                      +
  763.     ) ELSE (
  764.         ECHO + Restart computer: Denied                                       +
  765.     )
  766.     IF %AutoRestartMinerEveryHour% EQU 1 (
  767.         ECHO + Autorestart miner every hour: Enabled                          +
  768.     ) ELSE (
  769.         ECHO + Autorestart miner every hour: Disabled                         +
  770.     )
  771.     IF %AutoRestartMinerAtMidnight% EQU 1 (
  772.         ECHO + Autorestart miner at 00:00: Enabled                            +
  773.     ) ELSE (
  774.         ECHO + Autorestart miner at 00:00: Disabled                           +
  775.     )
  776.     IF %AutoRestartMinerAtMidday% EQU 1 (
  777.         ECHO + Autorestart miner at 12:00: Enabled                            +
  778.     ) ELSE (
  779.         ECHO + Autorestart miner at 12:00: Disabled                           +
  780.     )
  781.     IF %AutoRestartComputerEveryHour% EQU 1 (
  782.         ECHO + Autorestart computer every hour: Enabled                       +
  783.     ) ELSE (
  784.         ECHO + Autorestart computer every hour: Disabled                      +
  785.     )
  786.     IF %AutoRestartComputerAtMidnight% EQU 1 (
  787.         ECHO + Autorestart computer at 00:00: Enabled                         +
  788.     ) ELSE (
  789.         ECHO + Autorestart computer at 00:00: Disabled                        +
  790.     )
  791.     IF %AutoRestartComputerAtMidday% EQU 1 (
  792.         ECHO + Autorestart computer at 12:00: Enabled                         +
  793.     ) ELSE (
  794.         ECHO + Autorestart computer at 12:00: Disabled                        +
  795.     )
  796.     IF %EnableAUAutorun% EQU 1 (
  797.         ECHO + Additional program autorun: Enabled                            +
  798.     ) ELSE (
  799.         ECHO + Additional program autorun: Disabled                           +
  800.     )
  801.     ECHO + Amount of errors: [%ErrorsCounter%/%ErrorsAmount%], GPU: [!GPUCount!/%GPUDevicesAmount%]                            +
  802.     ECHO +----------------------------------------------------------------+
  803.     ECHO ==================================================================
  804.     SET FirstRun=1
  805.     IF EXIST "Logs\miner_*.log" (
  806.         CHOICE /C yn /T 60 /D n /M "Clean %MinerPath%Logs folder now"
  807.         IF ERRORLEVEL ==2 (
  808.             ECHO Now I will take care of your Zcash farm, and you can take a rest.
  809.             GOTO check
  810.         ) ELSE (
  811.             DEL /F /Q "Logs\*" && ECHO Clean %MinerPath%Logs finished.
  812.         )
  813.         CHOICE /C yn /T 60 /D n /M "Clean %MinerPath% folder now"
  814.         IF ERRORLEVEL ==2 (
  815.             ECHO Now I will take care of your Zcash farm, and you can take a rest.
  816.             GOTO check
  817.         ) ELSE (
  818.             CHOICE /C yn /T 60 /D n /M "Really, delete all useless files and folders from %MinerPath%"
  819.             IF ERRORLEVEL ==2 (
  820.                 ECHO Now I will take care of your Zcash farm, and you can take a rest.
  821.                 GOTO check
  822.             ) ELSE (
  823.                 FOR %%H IN ("%MinerPath%*") DO (IF NOT "%%H" == "%MinerPath%%~n0.bat" IF NOT "%%H" == "%MinerPath%%~n0.log" IF NOT "%%H" == "%MinerPath%autorun.exe" IF NOT "%%H" == "%MinerPath%config.bat" IF NOT "%%H" == "%MinerPath%miner.cfg" IF NOT "%%H" == "%MinerPath%%MinerProcessBat%" IF NOT "%%H" == "%MinerPath%cudart32_80.dll" IF NOT "%%H" == "%MinerPath%cudart64_80.dll" IF NOT "%%H" == "%MinerPath%miner.exe" IF NOT "%%H" == "%MinerPath%%MinerProcessProgram%" IF NOT "%%H" == "%MinerPath%%MinerProcessLog%" DEL /Q /F "%%H")
  824.                 FOR /F "tokens=*" %%I IN ('DIR %MinerPath% /A:D /B') DO (IF /I NOT "%%I" == "Logs" IF /I NOT "%%I" == "Profiles"  (RD /S /Q "%MinerPath%%%I"))
  825.                 ECHO Good. Folder %MinerPath% clean now.
  826.                 ECHO Now I will take care of your Zcash farm, and you can take a rest.
  827.                 GOTO check
  828.             )
  829.         )
  830.     )
  831. )
  832. GOTO check