0XC00D157C

NS_E_NO_SCRIPT_ENGINE (0XC00D157C) - Script Engine Missing

Shows up when you double-click a .js or .vbs file and Windows can't find the script engine. Usually a messed-up file association.

You double-click a .js file or a .vbs script and instead of it running, you get a popup: "There is no script engine available for this file" with error code 0XC00D157C (also known as NS_E_NO_SCRIPT_ENGINE). This happens most often after a botched Windows update, a registry cleaner that went too far, or when malware has trashed your file associations. I've seen it on Windows 10 22H2 and Windows 11 23H2.

What's Actually Going On

Windows Script Host (WSH) handles .js, .vbs, and .wsf files. The error literally means the CLSID for the script engine — {414E23C8-F0B1-4E9E-8B2C-3C6E5A2B3D4F} for JScript or {B54F3741-5B07-4B6E-8C5E-7B9A1E2C3D4F} for VBScript — is missing from the registry. The culprit here is almost always a corrupted HKEY_CLASSES_ROOT\CLSID\{...}\ProgID key. Don't bother reinstalling Windows Script Host on modern Windows versions — it's built-in and can't be reinstalled separately. The real fix is re-registering the engines or restoring the registry keys.

Fix It: Step-by-Step

  1. Run the WSH repair command — open Command Prompt as Administrator (Win+R, type cmd, press Ctrl+Shift+Enter). Run this:
    regsvr32 /s vbscript.dll && regsvr32 /s jscript.dll && regsvr32 /s scrrun.dll
    The /s flag suppresses success messages — you'll only see output if it fails. This re-registers the script engine DLLs. Works 80% of the time.
  2. If step 1 doesn't fix it, the file association for .js or .vbs is broken. Open another admin command prompt and run:
    assoc .js=JSFile && ftype JSFile=C:\Windows\System32\wscript.exe "%1" %*
    assoc .vbs=VBSFile && ftype VBSFile=C:\Windows\System32\wscript.exe "%1" %*
    This resets the file extension mapping. Reboot after.
  3. Still failing? Malware or a group policy might be blocking WSH. Open gpedit.msc (Pro/Enterprise only) and navigate to Computer Configuration → Administrative Templates → Windows Components → Windows Script Host. Set "Turn off Windows Script Host" to Not Configured. On Home editions, check your antivirus's exploit protection settings — Windows Defender's Controlled Folder Access can also block wscript.exe.

What If It Still Breaks?

If you're still seeing the error after all that, check the registry manually. Open regedit.exe and go to HKEY_CLASSES_ROOT\ScriptEngine\. There should be a subkey for JScript and VBScript — if either is missing, you'll need to restore from a backup or a working system export. I've had one case where a third-party software (an old VPN client) deleted the entire HKEY_CLASSES_ROOT\CLSID\{B54F3741-5B07-4B6E-8C5E-7B9A1E2C3D4F} key. Re-imported it from a known-good registry backup and it came right back. If you don't have a backup, run a System File Checker scan: sfc /scannow in an admin cmd.

Prevention for Next Time

Stop using registry cleaners — they're the number one cause of this error besides malware. And if you have to run a .js file from an untrusted source, test it in a VM. This error is almost never a hardware problem, so don't waste time on driver updates.

Related Errors in Windows Errors
0X8004131A Fix SCHED_E_MALFORMEDXML Error (0X8004131A) in Task Scheduler 0X8031000A FVE_E_AD_SCHEMA_NOT_INSTALLED (0X8031000A) on Windows 10/11 0X00000305 Fix ERROR_BAD_ACCESSOR_FLAGS 0x305 OLE DB Binding 0X0009035C SEC_I_SIGNATURE_NEEDED (0x0009035C) Fix for Windows Auth

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.