vbscript 启动一个进程 [英] vbscript start a process
本文介绍了vbscript 启动一个进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 vb 脚本可以启动一个 exe(甚至一个没有 gui 的进程):
I have a vb script that starts an exe (or even a process without gui):
strCom = "Start calc"
WSHShell.Run(strCom)
它没有启动程序,当我打开任务管理器时我看不到它.
但是当我直接在命令行中编写命令Start calc"时,它会打开它.
It doesn't start the program, when I open task manager I can't see it.
But when I write the command "Start calc" directly in the command line it opens it.
我如何使用脚本来做到这一点?
How can I do it using the script?
推荐答案
start
内置于 cmd.exe
;这不是一个实际的程序.
start
is built-in to cmd.exe
; it's not an actual program.
WSHShell.Run
需要一个物理文件,而不是一个 cmd
内置文件.
因此,您可以编写WSHShell.Run("calc.exe")
这篇关于vbscript 启动一个进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文