You’re trying to execute a command in the command prompt. But as soon as you hit Enter, cmd displays an error message saying, “not enough memory resources are available to process this command.”
This error is not only limited to the Command Prompt. You can also get the same error message while installing a new program or accessing certain system files.
As the message implies, this error means that Windows doesn’t have enough memory resources required to process the command, i.e., RAM, hard disk space.
But it’s not always the case. Sometimes there may be a completely different reason behind this error.
Causes of “Not Enough Memory Resources” Error
- Corrupted system files
- Temp files
- Missing Windows image
- Memory allocation issue
- Low IRPStackSIze Value
- Windows upgrade issue
Fixing Not Enough Memory Resources Are Available
Similar to the causes of the error mentioned above, there are various ways to fix it.
But before moving on to the fixes, do the following:
- Make sure there is enough RAM available. Running many programs simultaneously can cause the RAM to be fully occupied, which can then cause the error.
- Check if the C: drive has enough available space of at least 30 Gb.
- Your Windows is up to date.
After checking all of these things, if the problem still exists, try out the fixes explained below.
Scan & Fix Potential Problems Using Cmd
This is one of the easiest methods that may solve the issue. So, let’s start with it.
You can scan your computer to locate and fix potential problems with the command prompt using a single command.
To execute the command, follow the steps below:
- Press Windows key + Q and search for cmd
- Right-click and select Run as administrator.
- Enter the following command:
sfc/ scannow
If any problems are found during the scan, the system will solve them automatically.
But, if the same issue occurs while running this command, too, there might be a problem with the windows image. So, move on to the next fix to solve this issue.
Restore Windows Image Using DISM Tool
DISM (Deployment Imaging and Servicing Management) is a command-line tool used to prepare, modify, and service system images. You can use this tool to repair the windows image and solve the issue.
Since you’re already on the command prompt as administrator, enter the following command: Dism /Online /Cleanup-Image /RestoreHealth
It may take some time to complete this process, so be patient. After the process is complete, restart your pc and check if the error is solved or not.
You can also perform chkdsk to scan the hard disk for corrupted files.
Perform chkdsk
Chkdsk or Check Disk Utility is used to scan for errors on the hard drive and resolve those errors automatically. You can perform the chkdsk from the File Explorer or the Command prompt.
To Perform Chkdsk From File Explorer
Follow the steps mentioned below:
- Open the File Explorer (Press Windows key + E for a shortcut)
- Right-click on the C: drive and open Properties.
NOTE: The C: Drive is the usual place where Windows is installed. If your Windows is installed on any other drive, right-click on that drive and open Properties. - Select the tools tab
- Click the Check button and select Scan drive
To Perform Chkdsk From Command Prompt
- Run Command Prompt as Admin
- Enter the following command:
chkdsk: C
After completion, check if the issue is resolved or not.
Increase IRPStackSize Value
IRPStackSize stands for Input/Output Request Package Stack Size. And it is responsible for memory allocation to execute various processes. If any process exceeds the said range, the error will occur.
So, changing the IRPStackSIze Value might solve the memory resource error. You can change the Value through the registry editor. Make sure to back up the registry before you modify it so that you can restore it in case of incorrect modification.
This is a very common fix that everyone uses. It will likely solve the it.
To change the IRPStackSize Value, follow the steps below:
- Press Windows key + R to open Run
- Type “regedit” and click Ok
- Now on this window, navigate through the following path:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
- Locate IRPStackSize.If it exists, proceed to step 7. If it does not, then you need to create one.
- Right-click on the empty portion and select New > DWORD (32-bit) Value.
- Name the file IRPStackSize and press Enter.
- Right-click on the IRPStackSize and select Modify.
- Enter any value from 15-50 and click Ok.
I recommend entering a small value and checking if the issue exists. If the error is still there, then come back and increase the Value. Do this until the error is fixed.
Change The SharedSection Value
Sometimes the limitation in heap memory can cause the issue.
Desktop heap is the memory used to store UI objects, such as windows and menus. And the heap memory is defined in the registry under the key ‘SharedSection.’
Hence, changing the SharedSection Value can solve the error. Here’s how you can do so.
- Go to registry editor using the steps mentioned before.
- In this window navigate through the following path:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems
- Right-click on the Windows subsystem and select Modify
- On the Value data section, locate the SharedSection entry, and increase its second and third values.
However, negative performance may occur if you allocate too much memory to the desktop heap.
Delete Temp Files
Temporary files consist of data that help run a program faster and smoother while also performing as a recovery backup if your program or system shuts down suddenly. They are stored every time you run a program or browse different websites on the internet.
But sometimes, these files can create conflict with the system files and cause various issues, including the memory resource issue. So, deleting these files might help to solve the problem. Don’t worry! These files are useless after a program is closed or progress is saved.
To delete the temp files, follow these steps:
- On the Start menu, type
%temp%
- Press Ctrl + A to select all the folders
- Press Shift + Delete to delete them
- Press Windows key + E to open file explorer
- Now navigate to this location:
Local Disk (C): > Windows > Temp
- Press Ctrl + A to select and Shift + Delete to delete all the folders.
Restart your PC and check if the issue still exists.
Repair Windows Upgrade using Installation Disk
This method will likely solve the “not enough memory resources are available to process this command” issue if nothing else works. This process requires you to reinstall your Windows, which takes some time. So, use this method as a last resort.
To get started, you’ll need an external disk with atleast 8 GB of free space. This method is divided into two sections, and if your current PC is unbootable, you need to perform the first part on a separate pc.
Prepare Bootable Drive
- Download Windows ISO image and media creation tool from Microsoft’s official site.
- Now insert the external hard drive or pen drive and run the media creation tool to create a Windows installation disk.
Repair Windows Upgrade
- Insert the bootable drive in the pc that requires repair and run the setup.exe file.
- Select Upgrade Windows 10 and deselect check for new updates
- Choose whether or not you want to save all of your files.
- Follow the instructions carefully until the process is completed.
Now reboot your pc and check if the issue is solved or not.