Hi Eric B,
Welcome to Microsoft Q&A!
JavaScript is not a standalone component in Windows. This error you're seeing on Windows 11 sign-in is usually caused by a corrupt or misconfigured component. A startup app or script that relies on JavaScript (or JScript) might have been broken.
To better help with your issue, I'd like to ask if you can get past the login screen and the dialog appears after, or it blocks you from signing in normally? While waiting for the answer, here are some solutions if you can get into your PC:
1 - Quick fixes to try
- Repair C++ package:
- Open Settings > Apps > Installed apps > search for
C++ - Click three-dot next to
2015-2022 Redistributable (x64) - Select Modify > Repair > wait for it to finish and test.
- Open Settings > Apps > Installed apps > search for
- Disable Startup apps:
- Open Task Manager > Startup > Disable any unknown or suspicious entries.
- If the issue persists, disable all third-party apps (and those can be disabled)
- Run Windows Security or a trusted antivirus to ensure no malicious script is causing this.
2 - Check Windows script host and re-enable if needed
- Press Win + R > type
wscript> press Enter to open the settings window - If you get an error, Windows Script Host might be disabled or corrupted.
- In that case, search in Windows and open Registry Editor > Navigate to:
-
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings - Find (or create a new DWORD (32-bit) called)
Enabledand set it to1
-
Disclaimer: Generally, modifying registry subkeys or work groups is intended for advanced users, administrators, and IT Professionals. It can help fix some problems, however, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For further protection, first check out How to back up and restore the registry in Windows - Microsoft Support
3 - Repair system files and corruptions (if any)
- Right-click the Start logo > choose Terminal (Admin) to open PowerShell
- Run the following commands one by one (press Enter after each):
-
DISM /Online /Cleanup-Image /RestoreHealth -
sfc /scannow
-
4 - Repair with Windows reinstallations (keeping file)
- On your PC, go to Windows Settings > System > Recovery
- Click Reinstall now to Fix problems using Windows Update
If all previous solutions failed, an in-place upgrade may be the most reliable solution. Refer to Reinstall Windows with the installation media - Microsoft Support
- Navigate to the bottom of the instruction and expand In-place Upgrade section
- For Surface, you'll need Surface Recovery Image Download - Microsoft Support
Disclaimer: Windows reinstallation and in-place upgrade will refresh your Windows files and operating system without removing files or applications. That being said, we always recommend that if you have important data, you should back it up first before making large system changes.
I hope one of these methods resolves the problem for you. Let me know if you get stuck at a specific step.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.