Several users are reportedly getting the Cannot Create a File When That File Already Exists Windows error when trying to change the status of the Smart Card (SCardSVR) service from Disabled to a different state. The issue is reported to occur with multiple Windows versions, including Windows 7, Windows 8.1, and Windows 10.

Cannot Create a File When That File Already ExistsCauses of Cannot Create a File When That File Already Exists Error:

  • This mklink Cannot Create a File When That File Already Exists Windows error occurs only to those websites whose config file has been encrypted.
  • This error occurs due to a common Windows glitch that is confirmed to happen on Windows 8.1 and Windows 10.
  • This windows system error occurs to those systems where the AllowReplaceOnRename Metabase property is not set to 1.

Similar Types of Cannot Create a File When That File Already Exists Error:

  • cannot create a file when that file already exists PowerShell
  • cannot create a file when that file already exists a visual studio
  • cannot create a file when that file already exists SQL server

How to Fix & Solve Cannot Create a File When That File Already Exists Error Issue

As it turns out, this particular issue occurs due to a common Windows glitch that is confirmed to happen on Windows 8.1 and Windows 10. As far as we know, Microsoft has already released a fix for this particular glitch, but some users claim that the mklink Cannot create a file when that file already exists Windows error is still there and occurring in their system even after they installed the Microsoft-provided hotfix.

1. Installing the KB4057144 Update (Windows 10) –

If you’re encountering the issue on Windows 10, you have a straightforward fix that will allow you to resolve the issue with minimal hassle.  Microsoft has addressed this particular issue with a hotfix update that was released in January 2018.

The KB4057144 update addressed the issue where attempting to change the status of the Smart Card Windows service will trigger the mklink Cannot create a file when that file already exists IIS error.

  • Firstly, you have to press Windows key + R to open up a Run dialog box.
  • Then, type ms-settings:windowsupdate
  • Press Enter to open up the Windows Update tab inside the Settings app.
  • Then inside the Windows Update screen.
  • Click on Check for updates and install every available pending update.

Cannot Create a File When That File Already ExistsWhen prompted to restart, click the Restart now button to allow your OS to install the update.

  • Once the next startup is complete, return to the same screen and continue with the installation of the pending update until you have none left.
  • Once every pending update has been installed.
  • Reaccess the Services screen and see if you are now able to change the status of the Smart Card (SCardSVR) service.

Cannot Create a File When That File Already Exists

2. Changing the Status of the Smart Card (SCardSvr) via Regedit –

If the first method did not apply to your scenario, you might be able to circumvent the issue entirely by using the Registry Editor to modify the status of the Smart Card (SCardSvR). Several users in a similar situation have reported that the procedure below has helped them to change the status of the SCardSvR service without encountering the mklink Cannot create a file when that file already exists PowerShell error.

  • To perform this method, first of all, you have to press Windows key +R to open up a Run dialog box.
  • Then, type “regedit.”
  • Press Enter to open up the Registry Editor.
  • If prompted by the UAC (User Account Control), click Yes to grant administrative privileges.
  • Inside the Registry Editor, navigate to the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SCardSvr

*Note: You can either navigate to this location manually, or you can paste the address directly into the navigation bar.

  • Once you arrive at the location, double-click on the Start value from the right-hand side.
  • Next, change the Value data according to what state you want to set for the Startup type of the SCardSVR:

Automatic – 2
Manual – 3
Disabled – 4

Cannot Create a File When That File Already ExistsClick OK to save the changes.

  • Then close Registry Editor and restart your computer.
  • Once the next startup is complete, the Startup Type of Smart Card (SCardSVR) service should be already changed.

3. Changing the Status of the Smart Card (SCardSvr) via Command Prompt –

If the two methods above didn’t allow you to resolve the mklink Cannot create a file when that file already exists Windows 10 error, let’s see if a series of CMD commands will. In some cases, this issue is confirmed to be resolved by changing the Startup type of the Smart Card (SCardSVR) service directly from an elevated Command Prompt window.

  • Firstly, you have to press Windows key + R to open up a Run dialog box.
  • Then, type “cmd” and press Ctrl + Shift + Enter to open up an elevated Command Prompt.
  • When prompted by the UAC (User Account Control), click Yes to grant administrative privileges.

Cannot Create a File When That File Already ExistsOnce you arrive inside the elevated Command Prompt, type the following command to stop the Smart Card service:

net stop SCardSvr
  • Once the service has been stopped, use one of the following commands to change the Startup type of the service to the state that you want:
Automatic:
REG add "HKLM\SYSTEM\CurrentControlSet\services\SCardSvr" /v Start /t REG_DWORD /d 2 /f
Manual:
REG add "HKLM\SYSTEM\CurrentControlSet\services\SCardSvr" /v Start /t REG_DWORD /d 3 /f
Disabled:
REG add "HKLM\SYSTEM\CurrentControlSet\services\SCardSvr" /v Start /t REG_DWORD /d 4 /f
Automatic (Delayed Start):
REG add "HKLM\SYSTEM\CurrentControlSet\services\SCardSvr" /v Start /t REG_DWORD /d 2 /f
  • Once the Startup Type has been changed.
  • Type the following command to restart the Smart Card service:
net start SCardSvr
Changing the status of the Smart Card (SCardSvr) via Command PromptConclusion:

If you want to be as efficient as possible, follow the methods below in the order that they are presented. One of the following methods, which is mentioned here is gonna help you to fix or circumvent the mklink Cannot Create a File When That File Already Exists Windows error.

In this article, we have told the solution regarding mklink Cannot Create a File When That File Already Exists Windows error, and if it helped you in resolving this error, then we would love to know about it, and you can do that by commenting down below.

LEAVE A REPLY