Bitcoin Forum

Other => Beginners & Help => Topic started by: Redemption.man on June 27, 2011, 08:01:45 PM



Title: Bincoin miner as a windows service
Post by: Redemption.man on June 27, 2011, 08:01:45 PM
I've been trying to setup a miner as a windows service, but the service won't start it just times out. If I run the command the service is trying to run It works no problem. Just wondering if there is something I'm missing. I've double checked the user that the service is run by if I mis type the password I get an error about the credentials.


Title: Re: Bincoin miner as a windows service
Post by: Jerle on June 27, 2011, 09:43:15 PM
What miner are you using?


Title: Re: Bincoin miner as a windows service
Post by: deepceleron on June 27, 2011, 11:33:03 PM
You can set up a scheduled task to run the miner. Set the task to run every few hours to be sure that the miner stays up.
If you have the scheduled task use a different user account, you won't have to see the miner running on your desktop.


Title: Re: Bincoin miner as a windows service
Post by: lordbuggie on June 27, 2011, 11:38:52 PM
I agree with the scheduled task option.  Just make a batch file and put your whole command in that, then point the scheduled task at the batch file.


Title: Re: Bincoin miner as a windows service
Post by: Redemption.man on June 28, 2011, 08:56:52 AM
alot of the PC's i have access to are turned on at all times of the day, so i have to setup a few scheduled tasks to make sure its running. to stop more that one miner running at a time i have used the following batch file which checks for a the miner running before opening it again. you will need to change miner.exe to the name of the file name of the miner your running.

Code:
tasklist /FI "IMAGENAME eq miner.exe" 2>NUL | find /I /N "miner.exe">NUL
if "%ERRORLEVEL%"=="0" GOTO end

<Insert command to run miner here>

:end

hope this is useful to some one


Title: Re: Bincoin miner as a windows service
Post by: ottoxgam on July 08, 2011, 02:55:06 AM
Thanks for the coding to check to see if there was more than 1 running. I have this deployed off a server using pstools to open my miner on around 28 pcs every night


Title: Re: Bincoin miner as a windows service
Post by: ned123 on July 11, 2011, 11:47:07 AM
I've tried everything as OP.
I just cannot run Diablo Miner (fastest for me) on Windows as a service (service cannot start) or as a scheduled task (runs batch/direct command and just exits).
Anybody succeeded in running Diablo Miner without logged on user or it is impossible? Linux is an option, but I'll try to avoid it until I setup dedicated miner, and recently I have a lot of power outages :)


Title: Re: Bincoin miner as a windows service
Post by: infogulch on July 22, 2011, 06:50:32 PM
You can't run any GPU code as a service as of vista/7 due to session 0 isolation:

http://www.scribd.com/doc/58343489/Windows-Session-0-Isolation-Impact-on-GPU-as-Service (http://www.scribd.com/doc/58343489/Windows-Session-0-Isolation-Impact-on-GPU-as-Service)


Title: Re: Bincoin miner as a windows service
Post by: xus on July 22, 2011, 07:19:02 PM
Look it this:

http://www.sw4me.com/wiki/Winserv

this works perfectly for creating a service for windows.
but be aware that only non gui applications can run as a service..

best regards


Title: Re: Bincoin miner as a windows service
Post by: PLaci1982 on July 22, 2011, 10:59:28 PM
Seting up a service under WinXP/Vista/7:

http://support.microsoft.com/kb/251192 (http://support.microsoft.com/kb/251192)

You can donate some if it was helpfull ;)

You can't run any GPU code as a service as of vista/7 due to session 0 isolation:

http://www.scribd.com/doc/58343489/Windows-Session-0-Isolation-Impact-on-GPU-as-Service (http://www.scribd.com/doc/58343489/Windows-Session-0-Isolation-Impact-on-GPU-as-Service)

WinXP FTW!  ;D


Title: Re: Bincoin miner as a windows service
Post by: infogulch on July 22, 2011, 11:46:55 PM
@Placi1982 lol

Btw, I had some luck using: psexec (http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx) -i -u username -p password poclbm.exe ......

Switches are: interactive, username, and password. Use admin cred. Defaults to current comptuer. It doesn't work so well when someone is logged on, but I was trying to set as an idle-triggered scheduled task anyways.


Title: Re: Bincoin miner as a windows service
Post by: cdnadvis on July 23, 2011, 02:23:55 AM
alot of the PC's i have access to are turned on at all times of the day, so i have to setup a few scheduled tasks to make sure its running. to stop more that one miner running at a time i have used the following batch file which checks for a the miner running before opening it again. you will need to change miner.exe to the name of the file name of the miner your running.

Code:
tasklist /FI "IMAGENAME eq miner.exe" 2>NUL | find /I /N "miner.exe">NUL
if "%ERRORLEVEL%"=="0" GOTO end

<Insert command to run miner here>

:end

hope this is useful to some one

That was really helpful. Thanks a lot.


Title: Re: Bincoin miner as a windows service
Post by: btcdeep on August 29, 2012, 03:50:35 PM
(sorry for resurrecting and old thread, but this is one that I keep running into doing searches on the topic)

So, have people had success in getting scheduled tasks to start miners? I've been having the damnedest time. I love Redemption.man's batch file example and it works great when running it manually, but as any sort of scheduled task I can never get any mining to actually take place. When using a scheduled task, I can see that the miner starts, but upon checking GPU load I can see that no mining is taking place.  I am using poclbm, but will use any miner that works better with scheduled tasks if anybody can point me in the right direction. Here's the batch I run (run.vbs is commands to launch a given prompt hidden and run.bat is the commands to run poclbm username/password/flags)

Code:
tasklist /FI "IMAGENAME eq poclbm.exe" 2>NUL | find /I /N "poclbm.exe">NUL
if "%ERRORLEVEL%"=="0" GOTO end

wscript "c:\xyz\run.vbs" "c:\xyz\run.bat"

:end
edit: running Windows 7 x64, by the way.