How to enable your Windows Script Host through Registry Editor?

4.4k Views Asked by At

The error I'm getting:

IMG of Main Error of this question

Windows Script Host access is disabled on this machine. Contact your administrator for details.

From many websites you can find that making a file named: ["Enabled"] of "DWORD value 32 bit" in the registry location: [Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Script Host\Settings] will solve the issue. Here Changing / setting the value "0" means "Windows Script host is disabled." and "1" indicated to "enable" it.

Here comes the complexity:
The time you make such file and set to 0, reverting back to old state might not work for you. I set the value back to 1, deleted the file, recreated it. Nothing was working. 20 to 30 websites were telling only to edit the value but not telling anything further. I was becoming paranoid.

If you keep the Windows Script Host disabled, then you cannot see the error message. If any particular script file is causing the error to be triggered, you cannot see except the message "Windows Script Host is Disabled on this machine!".

1

There are 1 best solutions below

0
Bappy Sani On

It took me a day to find the right solution to enable it:
SRC= https://www.winhelponline.com/blog/windows-script-host-disabled-machine-contact-administator/

Section 4 from the website: image of section 4 in the website "

  1. Enable Windows Script Host access using command-line.

  2. To do this using command-line, execute these commands from elevated Command Prompt: REG DELETE "HKCU\SOFTWARE\Microsoft\Windows Script Host\Settings" /v Enabled /f

    REG DELETE "HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings" /v Enabled /f

  3. With the Windows Script Host restrictions lifted, you should only run scripts from trusted sources and if you’re sure they are safe to run.

That’s it! This enables Windows Scripting host on your computer.

So, in the command line you'll see:-> "Operation completed successfully!" [As each command you execute]
Final result: When you click on wscipt.exe, it no longer shows you that error message of being disabled!

Also, the "enabled" file in the given registry path will also be cleaned! img of registry path cleaned of "enabled" file

Now I can finally see the error message I messed up and made it worse:

img of wscript message finally being changed!

My goal was to change the error message from "generalized" to "specific".

From this:

Main Error

to that:

Specified error

Remember: Never to hide your problems this way as ignoring the problem will never solve anything!