To enable or disable Windows Script Host, type regedit.exe in Run box and hit Enter to open the Registry Editor.
Navigate to the following key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows Script Host\Settings
In the right panel, you will see Enabled. If you see the entry 0, it means that the Windows Script Host access is disabled on your Windows machine.
Double Click on it and give it Value Data 1 to enable it.
A value of 1 will enable Windows Script Host
A value of 0 will disable Windows Script Host.
Click on OK and exit the Registry. If you don’t see this entry, then you may need to create it, as it does not exist by default in Windows.
You will now, no longer receive the Windows Script Host access is disabled on this machine. In this way you can enable or disable Windows Script Host.