Invalid MS-DOS Function: How to Fix This File Error

Repairing the corrupted files can fix MS-DOS errors on your PC

by Milan Stanojevic
Milan Stanojevic
Milan Stanojevic
Windows & Software Expert
Milan has been enthusiastic about technology ever since his childhood days, and this led him to take interest in all PC-related technologies. He's a PC enthusiast and he... read more
Reviewed by Alex Serban
Alex Serban
Alex Serban
Windows Server & Networking Expert
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server... read more
Affiliate Disclosure
  • Repairing the system files can often help with Command Prompt errors such as this.
  • In some cases, it might be necessary that you modify your registry in order to fix this problem.
invalid ms dos function
To fix various PC problems, we recommend Restoro PC Repair Tool: This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:
  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer's security and performance
  • Restoro has been downloaded by 0 readers this month.

Advanced PC users use Command Prompt to perform commands quickly, but many reported an Invalid MS DOS function error while trying to do that.

In case you’re not familiar with this feature, we have a great guide that will explain what DOS Command Prompt is, so be sure to check it out.

To tackle this issue, it’s important to understand what causes it, so keep reading to find out everything you need to know.

Why does an Invalid MC DOS function message appear?

There are several reasons for this issue, but the most common are the following:

  • File corruption – Corrupted system files or corrupted data might cause this issue to appear.
  • Registry configuration – If your registry isn’t configured properly, you might encounter this error.

How do I fix Invalid MS DOS function?

Fixing this issue is relatively simple, but before we do that, make sure you try the following:

  • Use Safe Mode Access Safe Mode on your PC and check if this problem appears. If not, it means there’s an issue with your settings or user profile.

1. Run the SFC command

  1. Press Windows key + X and choose Windows Terminal (Admin).
  2. Run the following command: sfc /scannow
  3. Wait for the process to finish.

Once the command is finished, check if the problem is still there. In case you’re not able to run SFC or if it didn’t fix the issue, run these two commands as well:

DISM.exe /Online /Cleanup-image /Scanhealth

DISM.exe /Online /Cleanup-image /Restorehealth

2. Run chkdsk scan

  1. Right-click the Start button and choose Windows Terminal (Admin) from the menu.
  2. Now enter the following command, and be sure to replace X with the letter that matches the drive that is giving you this error: chkdsk X: /f

  3. Wait for the scan to finish.

After the scan is finished, check if Invalid MS DOS function error is gone.

3. Modify the registry

  1. Press Windows key + R and enter regedit. Click OK.
  2. Navigate to the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System
  3. Right-click the right pane and choose New. Next, select DWORD (32-bit Value).
  4. Name the new key CopyFileBufferedSynchronousIo and double-click it.
  5. Change the Value data to 1 and save the changes.
  6. Restart your PC.

These are just some of the solutions that can help you fix an Invalid MS DOS function error on your PC. In most cases, the issue is related to file corruption.

If you’re having more issues, we suggest reading our can’t run CMD as an administrator guide for more potential solutions.

What method did you use to fix this issue? Share it with us in the comments section below.

Still having issues? Fix them with this tool:


If the advices above haven't solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on to easily address them. After installation, simply click the Start Scan button and then press on Repair All.

This article covers:Topics: