Have you tried going to: "C:\WINDOWS\system32" and double-clicking the "wscript.exe" file?
Note - if you have Windows set to hide extension of known file types, it will simply be "wscript".
After double-clicking, change one of the options to activate the "Reset Defaults" button and then click the "Reset Defaults" button and apply. This should at least reset the Windows Script Host.
The other thing you might try is to run a search for "*.js" files (without quotation marks) and then right-click one of the found ".js" files > select Properties > verify that the "Opens with:" is set to "Microsoft (r) Windows Based Script Host" (the same wscript.exe file above).
Repeat the procedure in paragraph above, except search for "*.vbs" and then verify that the VBScript files are set to open with "Microsoft (r) Windows Based Script Host" as well.
I am not a coder, so scripting is not my thing. If these fail and you cannot reinstall the Windows Script 5.6, then the only other thing I can recommend is trying to manually register the "vbscript.dll" and "jscript.dll" files by using the following at the command prompt:
1 - c:\regsvr32.exe vbscript.dll
2 - c:\regsvr32.exe jscript.dll
Note - you would start at a "C:\" prompt and type in the "regsvr32.exe vbscript" (without parenthesis, and with a space between the 'regsvr32.exe' and the file name) > press "Enter" key to attempt manual registering of the ".dll" file. Repeat for the "jscript.dll" file.
If these fail, I would start to suspect the Java Script itself.
Hopefully someone with more knowledge of scripting will drop by.