Hey Claymore,
I'm trying to get my rigs under a sleep schedule as my electricity provider is charging extra $$ during peak hours of the day (for summer months). So, I've got a couple scripts that run using the Task Scheduler on Windows. I need to be able to close the miner before it sleeps the rig, so that when the task to wake the rig up and start the miner executes later, I won't have >1 instance of the miner running. I've tried the following:
C:\Users\Miner>taskkill /IM EthDcrMiner64.exe
ERROR: The process "EthDcrMiner64.exe" with PID 7216 could not be terminated.
Reason: This process can only be terminated forcefully (with /F option).
...which made me do this:
C:\Users\Miner>taskkill /IM EthDcrMiner64.exe /F
ERROR: The process "EthDcrMiner64.exe" with PID 7216 could not be terminated.
Reason: Access is denied.
Can you tell me a good way to gracefully exit your miner via cmd?
Bump! Can anyone help me out here?
taskkill /F /IM EthDcrMiner64.exe /T >nul
Used to work for me.. And try using "runas /user:administrator C:\data\mybatchfile.bat"
EDIT: BTW are you trying to close the BAT file window itself with miner started in it? 
Here it is the whole BAT file of mine:
@echo off
setx GPU_FORCE_64BIT_PTR 0 >nul
setx GPU_MAX_HEAP_SIZE 100 >nul
setx GPU_USE_SYNC_OBJECTS 1 >nul
setx GPU_MAX_ALLOC_PERCENT 100 >nul
set /a num=%random% %%2
echo %num%
:start
timeout -t 180 /nobreak
if %num% == 0 start /min EthDcrMiner64.exe -r 1 -tt 75 -dbg -1 -epool exp-eu.dwarfpool.com:8018 -ewal 0xxxx -epsw x -eworker bittrex -allcoins -1 -ethi 12 -dpool stratum+tcp://dcr.coinmine.pl:2222 -dwal xxx.xxx -dpsw xls -dcri 60 -dcrt 8
if %num% == 1 start /min EthDcrMiner64.exe -r 1 -tt 75 -dbg -1 -epool eu1.ethermine.org:4444 -esm 1 -ewal 0xxxx -epsw xxx@gmail.com -eworker xxx -ethi 12 -dpool stratum+tcp://dcr.coinmine.pl:2222 -dwal xxx.xxx -dpsw xls -dcri 43 -dcrt 8
::if %num% == 1 start /min EthDcrMiner64.exe -r 1 -tt 75 -dbg -1 -epool eu1.ethermine.org:4444 -esm 1 -ewal 0xxxx -epsw xxx@gmail.com -eworker xxx -ethi 12 -dpool stratum+tcp://dcr.suprnova.cc:2252 -dwal xxx.xxx -dpsw xls -dcri 43 -dcrt 8
:: pause
if %num% == 0 echo 0. Mining Exps..
if %num% == 1 echo 1. Mining Eths..
if %num% == 0 timeout -t 21600 /nobreak
if %num% == 1 timeout -t 64800 /nobreak
taskkill /F /IM EthDcrMiner64.exe /T >nul
echo Just killed the miner!
if %num% == 0 (
set num=1
goto start )
if %num% == 1 (
set num=0
goto start )
There's some neat stuff like random start of mining eth or clones, timeout after rebooting and rotating mining of the alt coins after given period..

EDIT: Forgot to add EXP row.