英文:
How to enable your Windows Script Host through Registry Editor?
问题
我遇到的错误:
在此计算机上已禁用 Windows 脚本主机访问。请联系管理员获取详细信息。
从许多网站上可以找到,创建一个名为:["Enabled"] 的 "DWORD 32 位值" 文件,位于注册表位置:[计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Script Host\Settings]
,可以解决此问题。在此处,将值更改/设置为 "0" 表示 "Windows 脚本主机已禁用",而 "1" 表示 "启用"。
这里出现了复杂性:
当你创建这样的文件并将其设置为 0 时,恢复到旧状态可能对你无效。我将值设回 1,删除了文件,重新创建了它。什么都不起作用。有 20 到 30 个网站只告诉你编辑值,但没有进一步的说明。我变得有点焦虑。
如果保持 Windows 脚本主机禁用,那么你将无法看到错误消息。如果某个特定的脚本文件引发了错误,你只能看到消息 "Windows 脚本主机在此计算机上已禁用!"。
英文:
The error I'm getting:
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
得分: 2
这是翻译好的内容:
需要花费我一天的时间来找到启用它的正确解决方案:
SRC=
https://www.winhelponline.com/blog/windows-script-host-disabled-machine-contact-administator/
来自该网站的第4部分:
-
使用命令行启用Windows脚本主机访问。
-
要使用命令行执行此操作,请从提升的命令提示符中执行以下命令:
REG DELETE "HKCU\SOFTWARE\Microsoft\Windows Script Host\Settings" /v Enabled /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings" /v Enabled /f
-
如果解除了Windows脚本主机的限制,您应该只运行来自受信任来源并确保其安全的脚本。
就是这样!这将启用您计算机上的Windows脚本主机。
因此,在命令行中,您将看到:->“操作成功完成!”
[当您执行每个命令时]
最终结果:单击wscipt.exe时,它将不再显示被禁用的错误消息!
此外,给定的注册表路径中的“enabled”文件也将被清除!
现在,我终于可以看到我搞砸并使情况变得更糟的错误消息:
我的目标是将错误消息从“一般”更改为“具体”。
从这个:
到这个:
记住:永远不要以这种方式隐藏您的问题,因为忽视问题永远不会解决任何问题!
英文:
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:
"
-
Enable Windows Script Host access using command-line.
-
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
-
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!
Now I can finally see the error message I messed up and made it worse:
My goal was to change the error message from "generalized" to "specific".
From this:
to that:
Remember: Never to hide your problems this way as ignoring the problem will never solve anything!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论