wscript和cscript之间的区别 [英] Difference between wscript and cscript
问题描述
cscript和wscript有什么区别?在Windows中执行Telnet和FTP自动化最好?
在Windows中,可执行文件是控制台应用程序或Windows应用程序(或SFU或本机应用程序,但这并不重要)。
内核检查可执行文件中的标志以确定哪个标志。
开始使用 如果它是Windows应用程序,则不会创建控制台,并且 所以答案是:如果你希望你的脚本有一个控制台窗口,使用 这也会影响一些行为,如WScript.Echo命令。在 对于您的应用程序,我建议 What is the difference between cscript and wscript? Which is best for doing Telnet and FTP automation in Windows? In Windows, an executable is either a console application or a Windows application (or a SFU or Native application, but that doesn't matter here). The kernel checks a flag in the executable to determine which. When starting using If it is a Windows application, no console will be created and So the answer is: If you want your script to have a console window, use This also affects some behaviors, such as the WScript.Echo command. In a For your application I suggest 这篇关于wscript和cscript之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! CreateProcess
WinAPI函数时,如果它是一个控制台应用程序,内核将为它创建一个控制台窗口没有一个,并附上 STDIN
, STDOUT
和 STDERR $ c
STDIN
, STDOUT
和 STDERR
会被默认关闭。
WSCRIPT.EXE
和 CSCRIPT.EXE
几乎完全相同,除了一个被标记为Windows应用程序和其他标记作为一个控制台应用程序(猜猜这是怎么回事!)。
CSCRIPT.EXE
。如果您希望它没有控制台窗口,请使用 WSCRIPT.EXE
。
CSCRIPT.EXE
中,它将一行写入控制台窗口。在 WSCRIPT.EXE
中显示一个消息框。
CSCRIPT。 EXE
。我认为你也应该看看PuTTY和PLink,你也应该在这里看到:
CreateProcess
WinAPI function, if it is a console application, the kernel will create a console window for it if the parent process doesn't have one, and attach the STDIN
, STDOUT
and STDERR
streams to the console.STDIN
, STDOUT
and STDERR
will be closed by default.WSCRIPT.EXE
and CSCRIPT.EXE
are almost exactly identical, except that one is flagged as a windows application and the other is flagged as a console application (Guess which way around!).CSCRIPT.EXE
. If you want it to NOT have a console window, use WSCRIPT.EXE
.CSCRIPT.EXE
this writes a line to the console window. In WSCRIPT.EXE
it shows a messagebox.CSCRIPT.EXE
. I think you should also look at PuTTY and PLink, and you should also see this here: