I want the script to run as soon as I press the power button, WITHOUT ANYONE LOGGING IN. Hence why I cannot simply use the startup folder or the task scheduler, as both of these only call programs when a user logs in.
Why I need this:
I'm attempting to setup a headless Ethereum miner on my old Windows 10 PC. Sometimes I experience short power blips at home, just long enough to knock the miner offline. I would like to be able to restart the mining process simply by pressing the power button, instead of going through the whole hassle of dealing with RDP.
@echo off echo Starting Etherminer >> log.txt goto START :START setx GPU_FORCE_64BIT_PTR 0 setx GPU_MAX_HEAP_SIZE 100 setx GPU_USE_SYNC_OBJECTS 1 setx GPU_MAX_ALLOC_PERCENT 100 setx GPU_SINGLE_ALLOC_PERCENT 100 etherminer.exe --farm-recheck 200 -G -S us1.ethermine.org:4444 -FS us2.ethermine.org:4444 -O <My_Wallet_Hash>.<My_System_Name> >> log.txt 2>>&1 echo Error: Etherminer Application Exited >> log.txt echo Attempting to Restart >> log.txt goto START
The script runs fine on its own, but now I need help getting it to launch when the system is powered on.
Thank you for your time, and for whatever help you may be able to provide.