Forum Discussion

miya_13's avatar
miya_13
Copper Contributor
Sep 26, 2023
Solved

Is there any way avoiding files locking by Defender for Endpoint (mssense.exe) without excluding

We have received reports from end users of our application about an issue discussed in the link “Defender for Endpoint (mssense.exe) locking files and causing issues”. They are experiencing errors du...
  • LeonPavesic's avatar
    Sep 26, 2023

    Hi miya_13,

    Is there any way avoiding files locking by Defender for Endpoint (mssense.exe) without excluding?

    There is no known way to avoid file locking by Defender for Endpoint (mssense.exe) without excluding the files or folders. MsSense.exe is the primary process for the functions of Microsoft Defender for Endpoint outside of antimalware scanning. It is responsible for gathering information about files on the system, such as their hash and digital signature. This information is used to detect and prevent malware infections.

    Why is MsSense.exe locking files?

    MsSense.exe may lock files for a number of reasons, including:

    • To scan the file for malware.
    • To create a copy of the file for analysis.
    • To prevent the file from being modified or deleted while it is being analyzed.

    Why is MsSense.exe locking files in your customers' environments but not in yours?

    There are a number of possible reasons why MsSense.exe may be locking files in your customers' environments but not in yours. These include:

    • The files that are being locked may be different.
    • The version of Microsoft Defender for Endpoint that is installed may be different.
    • The configuration of Microsoft Defender for Endpoint may be different.
    • The environment in which Microsoft Defender for Endpoint is running may be different.

    Could this be resolved with just updating Endpoint?

    It is possible that updating Microsoft Defender for Endpoint could resolve the issue. 

    Is there any prospect that improving the reliability of our software(e.g. adding digital signatures) will prevent this from happening?

    Adding digital signatures to your software may help to reduce the likelihood of MsSense.exe locking your files. However, there is no guarantee that it will prevent it from happening altogether. MsSense.exe may still lock your files if it suspects that they are malicious, even if they have digital signatures.

    What can you do to help your customers?

    The best way to help your customers is to work with Microsoft to resolve the issue. You can open a support case with Microsoft and provide them with as much information as possible about the issue, including the following:

    • The version of Microsoft Defender for Endpoint that is installed.
    • The configuration of Microsoft Defender for Endpoint.
    • The environment in which Microsoft Defender for Endpoint is running.
    • The specific files that are being locked.
    • The errors that your customers are experiencing.

    Microsoft may be able to provide you with a fix for the issue or help you to work around it.

    In the meantime, you can also advise your customers to try the following:

    • Make sure that they are running the latest version of Microsoft Defender for Endpoint.
    • Try updating their antivirus software to the latest version.
    • Try restarting their computers.
    • Try running their applications as administrator.
    • Try excluding the files that are being locked from Microsoft Defender for Endpoint.


    Please click Mark as Best Response & Like if my post helped you to solve your issue.
    This will help others to find the correct solution easily. It also closes the item.


    If the post was useful in other ways, please consider giving it Like.


    Kindest regards,


    Leon Pavesic (LinkedIn)

Resources