XMRig Idle Background Mining on Micro$oft WindowsⓇ
I found a very easy way you can use your computer to mine Monero when it goes idle, sadly for what I know this only works on Windows. It uses the
--pause-on-active=N
flag,N
of course being a number, in seconds. XMRig will automatically start mining when you leave your computer idling, something that I do all the time.
Download XMRig
To begin, download XMRig, either from GitHub or their official website. Note that Windows Defender or whatever the fuck you’re using might start to spergout. You already know what to do.
Now unzip it. You will see a bunch of files but the only ones you will need are xmrig.exe
and WinRing0x64.sys
which you will have to copy somewhere, like your C:\
drive or something, let me repeat WinRing0x64.sys
has to be in the same folder as the xmrig executable, preferably in your $PATH
although not really necessary, it’s nice because you can access it through anywhere with PowerShell or CMD with your terminal emulator.
image-5.png
If you want to, create an IDK “cliprograms” on the root of your C:\
drive for example and drop these two files in there, then Win+R
and type systempropertiesadvanced.exe
and press enter or just search “path” on the search bar, on the taskbar > environment variables and you add the fucking folder you chose, you know what do to, if you don’t well just Google it retard.
image.png
Creating a new task on Task Scheduler
Ok, now we can actually start daemonizing XMRig on Windows. Does Windows even call these daemons?
image-2.png
- Open Task Scheduler by searching on the taskbar or
Win+R
, typingtaskschd.msc
and pressing enter. - Click on Task Scheduler Library
- Create Task…
Now a wizard thingy will pop up. You could see on my screenshot that I have created mine already so just copy and paste what I did, making modifications to your liking.
General
General task configurations.
image-1.png
- Give it a Name
- Check run with highest privileges
- Configure it to Windows 10 or something, I don’t actually know what this does
Triggers
Configuring triggers.
image-3.png
- Click new
- Select “At log on” (and not at startup, I tried and it didn’t work)
- Specific user, then selection your user if it’s not already you
Actions
Configuring what the task will do; mine Monerojn.
image-4.png
- Action: Start a program
- Select the path to XMRig, paste it or browse
- Add the arguments:
-B
- Background mining, the CLI won’t pop up--pause-on-active 50
- XMRig will only mine when your PC is idle!- All the rest of arguments you use
That’s basically it, I didn’t bother messing with other settings but nothing is keeping you from doing it. You can try running the task and seeing if everything works, rebooting to see if it starts up, removing the -B
flag to see if it starts with admin permissions or if it starts at all, and etc.
Created on: Wednesday, 20 March 2024