Advertisement
CircusDad

StartMining.bat

Nov 12th, 2017
1,155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. @echo off
  2.  
  3. :: BatchGotAdmin
  4.  
  5. ::-------------------------------------
  6.  
  7. REM --> Check for permissions
  8.  
  9. >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  10.  
  11.  
  12.  
  13. REM --> If error flag set, we do not have admin.
  14.  
  15. if '%errorlevel%' NEQ '0' (
  16.  
  17. echo Requesting administrative privileges...
  18.  
  19. goto UACPrompt
  20.  
  21. ) else (
  22.  
  23. goto gotAdmin
  24.  
  25. )
  26.  
  27.  
  28.  
  29. :UACPrompt
  30.  
  31. echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  32.  
  33. set params = %*:"="
  34.  
  35. echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
  36.  
  37.  
  38.  
  39. "%temp%\getadmin.vbs"
  40.  
  41. del "%temp%\getadmin.vbs"
  42.  
  43. exit /B
  44.  
  45.  
  46.  
  47. :gotAdmin
  48.  
  49. pushd %~DP0
  50.  
  51. ::--------------------------------------
  52.  
  53. :: Modified for https://vegamining.blogspot.com/
  54.  
  55. :: Thanks for your tips as well!
  56.  
  57. :Start
  58.  
  59. devcon.exe disable "PCI\VEN_1002&DEV_687F"
  60.  
  61. timeout /t 5
  62.  
  63. devcon.exe enable "PCI\VEN_1002&DEV_687F"
  64.  
  65. :: ***********************************************************************
  66. :: ** REPLACE LINE BELOW WITH YOUR LINE FROM "Run_OverdriveNTool.bat" ****
  67.  
  68. OverdriveNTool.exe -r1 -r2 -r3 -r4 -p1Vega64 -p2Vega56 -p3Vega56 -p4Vega64
  69.  
  70. :: ***********************************************************************
  71. :: ***********************************************************************
  72.  
  73. start "XMR-STAK Unified" xmr-stak.exe --config config.txt
  74.  
  75. echo.
  76.  
  77. echo.
  78.  
  79. echo Press any key to restart the miner...
  80.  
  81. pause>NUL
  82.  
  83. Taskkill /im xmr-stak.exe /f
  84.  
  85. GOTO :Start
  86.  
  87. POPD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement