The issue of “cmd pops up at startup with ‘unable to open xmrig.json’ typically occurs when the Windows operating system tries to run a command prompt (cmd) window to execute a program or script during startup, but it cannot find or access the required configuration file (xmrig.json) for that program.
The most common cause of this issue is a malware infection, as the xmrig.json file is related to the XMRig cryptocurrency miner software that can be used by cybercriminals to mine digital currencies on victims’ computers without their knowledge or consent.
Malware may have installed the XMRig miner on the affected computer, but the configuration file may be missing or deleted, causing the error message to appear.
However, it is also possible that the issue is caused by a legitimate program that requires the xmrig.json file to run, but the file is missing or moved to a different location. In this case, the program may need to be reinstalled or the file location may need to be updated.
In this guide, we will discuss the different troubleshooting methods you can try to resolve the issue. Move forward with the one that fits your situation the best.
1. Run a malware scan
Running a malware scan can help identify and remove any malware that may be causing the “unable to open xmrig.json” error message at startup.
If malware is installed on a computer, it can install additional software, including the cryptocurrency miner XMRig. Furthermore, malware can delete or modify the configuration file (xmrig.json) required to run the XMRig miner software. This can cause the error message to appear when the operating system attempts to run the miner program during startup.
A malware scan can detect and remove malware on the computer. The antivirus or antimalware software scans system files, programs, and processes, and removes any suspicious or malicious code, restoring the system to its previous state.
Here is how you can run a malware scan on your computer:
- Press the Windows + S keys together to open the Search utility.
- Search for Security and click Open.
- In the Windows Security app, click on Virus & threat protection.
- Click on Scan options and select the type of scan you want to run. In a quick scan, malware is checked in the most common areas where it is likely to hide, while in a full scan, the entire system is checked.
- In case you cannot find Scan options hyperlink, expand the Microsoft Defender Antivirus options dropdown and turn the toggle on in the menu. You should be able to see the Scan options hyperlink after you do this.
- Click on Scan now to start the selected scan.
- Once the scan is complete, the Windows Security app will display the results of the scan. If any malware is detected, you can click on Start actions to remove it.
Alternatively, you can use a third-party antivirus or antimalware program to run a malware scan on your Windows computer. Many reputable programs are available for free or for purchase online. To run a scan using a third-party program, you can simply follow the instructions provided by the software.
2. Use AutoRuns
The troubleshooting method involves downloading and using Autoruns, a free Microsoft utility that helps manage startup programs on Windows. In this method, we will be locating and deleting any entries related to the AppData\Roaming\Dll folder, which may be causing the “unable to open xmrig.json” error at startup.
Here are the steps to follow:
- Download Autoruns from the official Microsoft website.
- Unzip the autoruns64.exe file and run it as an administrator.
- In the Autoruns Options menu, make sure that Hide Windows Entries and Hide Microsoft Entries are unchecked, and Hide Empty Locations is checked.
- In the Quick Filter box, type AppData\Roaming\Dll to search for any entries related to this folder.
- Right-click on any entries found and select Delete (you may see an entry named MSDllHelper).
- If you deleted any entries related to the AppData\Roaming\Dll folder, restart your computer.
- After restarting your computer, delete the C:\Users\username\AppData\Roaming\Dll folder and the C:\Users\username.config folder.
By following these steps, any unwanted startup programs related to the AppData\Roaming\Dll folder will be removed, which may resolve the “unable to open xmrig.json” error at startup.
3. Uninstall the problematic program
It is also possible for malware to enter a system after installing a program on Windows. Malware can be disguised as legitimate software, or it can be bundled with other software and installed without the user’s knowledge or consent.
In case you started encountering the issue after installing a new program on the system, removing the faulty software can help you fix the problem.
Here is how you can uninstall the problematic program:
- Press the Win + R key to open Run.
- Type control in the text field of Run and click Enter.
- Click on Uninstall a program under Programs.
- Scroll through the list of installed programs and locate the program you wish to uninstall.
- Right-click on the program to select it.
- Click on the Uninstall button from the context menu.
- Follow the prompts to complete the uninstall process and then restart your computer.