利用vbs隐藏dos窗口

方法一:

option explicit
dim wshshell
set wshshell=wscript.createobject("wscript.shell")
wshshell.run "c:\1.txt",0,true

方法二:

option explicit

dim ws

set ws=wscript.createobject("wscript.shell")
ws.run "c:=\1.txt /start",0
上述两种方法的原理是一样的,多是利用里vbs的内建对象。其中C:\1.txt为要隐藏运行的程序的绝对路径。0为隐藏,2为最小化,3最大化。

posted @ 2020-11-06 11:30  荒野游侠  阅读(417)  评论(0编辑  收藏  举报