我的vbs脚本在控制台上没有回显任何内容

时间:2019-05-28 07:33:22

标签: cmd vbscript console echo

我在win10上编写了一个非常简单的vb脚本,称为my.vbs:

WScript.Echo "Hello"
//WScript.Echo
Dim obj  
Set obj = CreateObject("Scripting.Dictionary")
Wscript.Echo "Like this?"

Set fso = CreateObject ("Scripting.FileSystemObject")
Set stdout = fso.GetStandardStream (1)
Set stderr = fso.GetStandardStream (2)
stdout.WriteLine "This will go to standard output."
stderr.WriteLine "This will go to error output."

我使用powershell和cmd在vsc中运行它,它们在控制台上都具有相同的输出:

cscript my.vbs
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

为什么我的“ Echo”功能无法在控制台上打印任何内容?我有想念吗?

0 个答案:

没有答案