Block Notepad

Nihal Prasad 0 Reputation points
2025-03-14T06:50:48.7233333+00:00

Hi All,

We have requirement from Client that we need to block only JavaScript file (.JS) to be open using notepad.
Can anyone please let me know if this is achievable or not , if yes, how can we achieve it.

Thanks

Windows for business Windows Server User experience Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2025-03-14T08:52:19.17+00:00

    Hello,

    Thank you for posting in Microsoft Q&A.

    Based on the description, I understand your question is related to notepad.

    Go to Settings > Apps > Default apps.

    Scroll down and click on Choose default apps by file type.

    Find the .js file type in the list.

    Change the default app to a different program (e.g., a text editor other than Notepad or a custom script that does nothing).

    You can also block the execution of JavaScript files using Attack Surface Reduction (ASR) rules in Microsoft Defender

    Have a nice day.

    Best Regards,

    Molly

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.