Windows 无法识别 VB shell

Windows 无法识别 VB shell

我在 Windows 2003 服务器上工作。当我在服务器上创建 VB 脚本时test.vbs,我没有看到典型的 VB 图标。取而代之的是,我得到了一个不同的图标。

另外,当我运行 test.vbs 时,Windows 会显示“打开方式”窗口

为什么 Windows 无法识别 VB shell?
我该如何修复?

答案1

当您看到“打开方式”对话框时,有一个选项可以选择任意程序。使用该选项并选择“C:\Windows\system32\cscript.exe”或“C:\Windows\system32\wscript.exe”。前者在命令行 shell 中运行 Vbscript(通常效果最好),后者使用窗口环境(任何 WScript.echo 命令都会转到消息框),这通常不是您想要的。

答案2

您的关联可能已关闭,请尝试运行:cscript //H:cscript or //H:wscript

相关内容