When you run a Windows script using wscript.exe or cscript.exe, error Windows Script Host access is disabled on this machine may pop-up. However, in systems affected by malware, the error appears at regular intervals, without any script invocation by the user.
So the key questions are:
- Which script is being run that causes the error message?
- How do I enable Windows Script Host access in the machine?
This post address those questions.
![Top best free driver installer Top best free driver installer](/uploads/1/2/4/9/124952684/740010420.png)
Contents
- [Fix] Windows Script Host Access is Disabled on this Machine
[Fix] Windows Script Host Access is Disabled on this Machine
If the message “Windows Script Host access is disabled” appears at every startup or in regular intervals without you doing anything, then a malware script (.vbs, .js or .wsf) may be trying to run in the background, and is prevented by Windows Script Host restriction in effect in your system, which is very good. In such cases, your aim should be to eliminate the malware from the system completely rather than fixing the script host error message.
Run a thorough malware scan in your system first. Until every trace of malware is removed, do not lift the script host restriction. The restriction is only protecting your system.
- FIX 'Windows Script Host access is disabled on this machine' 1. Press WinKey + R, and type 'regedit'.
- Windows Script Host access is disabled on this machine. Windows Script Host or WSH, is a Microsoft technology that provides scripting abilities like batch files, but includes many more features.
- How to Enable Windows Script Host. The Windows Script Host, or WSH, facilitates the execution of scripts on your computer such as VB or Java. Enabled by default, WSH enables system administrators to automate a number of processes on a Windows system via scripts, such as mapping network drives and connecting printers.
Dec 11, 2018 Hi, it is possible to totally disable or enable Win10 Family under Win10 Family, see for instance How to blacklist or whitelist a program in Windows 10 I want to enabled Windows Script Host ONLY for a set of (personal) scripts, aka white list. You can also follow the steps through Fix Windows Update errors by using the DISM or System Update Readiness tool to check for any update errors. Note: Please perform the Clean boot on your PC. Clean Boot temporarily disables all third party applications as well as all Microsoft non-essential services so only basic drivers will run. HKEYLOCALMACHINE 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.
Investigate which script is trying to run that causes the error?
If the error appears without you manually launching a script, then it’s possible that a malware script is trying to run in the background, probably as a scheduled task.
Use Task Manager to find the script file name
You can use a simple tool like Task Manager to find out the script file name that’s being executed. Use these steps:
Enable Windows Script Host Access
- Let the script error window be on the screen. Don’t dismiss it yet.
- Disconnect your computer from the internet.
- Open Task Manager (Ctrl + Shift + Esc) and click the Details tab.
- Right-click the column header, click Select Columns.
- Enable the Command line checkbox and click OK.RELATED: Check out post Configure Task Manager to display full path of running processes for more information and screenshots.This shows the complete path and file name of the script file which is trying to run silently. In this example, a script file named protect.vbs is trying to run from the %TEMP% folder of the user profile.Related: Process Explorer from Windows SysInternals can be used to find the process name, path and full arguments. Check out post How to Find Which Program Caused An Unknown Error Message? for details.
Use Advanced Troubleshooting Tools
Further, you can use Autoruns, another excellent tool from Microsoft Windows SysInternals to find the startup launch-point (Startup or Task Scheduler) used by that malware script.
Start your investigation from there. If you’re an advanced user, you can even edit the script file using Notepad and see what code is being executed. Ransomware usually employs .vbs, .js, .wsh or .hta files to download the crypto-ransomware payload from a remote server, run it on your local system and encrypt your data or erase them completely.
First of all, if someone could drop a malware script in your TEMP directory and launch it, then there exists some really serious vulnerability in your system. Antivirus and anti-malware protection may not always help if your system is vulnerable to an exploit. You should make sure that your system is up to date in terms of Windows Update patches, as well as updates for the programs you’re using in your system.
Do a thorough checkup using a reputed anti-malware tool such as Malwarebytes.
How do I enable Windows Script Host access?
If your system is not connected to a domain, here are the steps to remove the error “Windows Script Host Access is Disabled”. This procedure will enable running Windows Scripts (.vbs or .js) on your system.
Enable Windows Script Host access using the Registry Editor
- Press WinKey + R to bring up the Run dialog.
- Type
regedit.exe
- Delete the value named Enabled in following keys:
If a key doesn’t exist, ignore and check the next key. - Exit the Registry Editor.
Enable Windows Script Host access using command-line
To do this using command-line, execute these commands from elevated Command Prompt:
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.
One small request: If you liked this post, please share this?
One 'tiny' share from you would seriously help a lot with the growth of this blog.Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
You'd like to read these articles:
About the author
Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.
RECOMMENDED: Click here to fix Windows errors and optimize system performanceIf you have disabled Windows Script Host access on this machine, contact your administrator for more information on your Windows 10/8/7 computer, then this message may interest you. Today we will see how to enable or disable Windows Script Host.
Fix Update October 2019:
We recommend you try using this new tool. It fixes a wide range of computer errors, as well as protecting against things like file loss, malware, hardware failures and optimizes your PC for maximum performance. It fixed our PC quicker than doing it manually:
- Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
- Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
- Step 3 : Click “Repair All” to fix all issues.
(optional offer for Advanced System Repair Pro ->Website | EULA | Privacy Policy | Uninstall)
Windows Script Host or WSH, is a Microsoft technology that provides scripting capabilities like batch files, but includes many other features. These scripts can be executed directly from the desktop by double-clicking on a script file or from a command prompt. It can be run either from the Windows host wscript.exe in protected mode, or from the shell host cscript.exe in real mode.
Several HTML malware has been reported to use WSH objects, so those that do not require this feature tend to disable it. However, disabling WSH prevents users from running scripts, including VBScript and JScript scripts, based on this technology – and some software requires this feature to enable it.
To enable or disable Windows Script Host, type.exe in the Run field and press Enter to open the registry editor.
Navigate to the next button:
HKEY_LOCAL_MACHINESoftwareMicrosoftWindows Script Host Settings
In the right part you see Enabled. If you see entry 0, it means that access to the Windows script host on your Windows computer is disabled.
Double-click and give him the value data 1 to activate it.
- A value of 1 enables the Windows script host
- A value of 0 disables Windows Script Host.
Click OK and exit the registry. If you do not see this entry, you may need to create it because it is not present by default in Windows.
You will no longer have access to the Windows script host on this machine. This way, you can enable or disable Windows Script Host.
You can also use our FixWin to solve this problem. It offers a one-click correction under the Additional Corrections section.
RECOMMENDED: Click here to troubleshoot Windows errors and optimize system performance
![Enable windows script host access using command-line Enable windows script host access using command-line](/uploads/1/2/4/9/124952684/973526969.png)