Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 需要帮助以不可见的方式从另一批运行一批吗_Windows_Batch File_Vbscript_Cmd_Powershell 3.0 - Fatal编程技术网

Windows 需要帮助以不可见的方式从另一批运行一批吗

Windows 需要帮助以不可见的方式从另一批运行一批吗,windows,batch-file,vbscript,cmd,powershell-3.0,Windows,Batch File,Vbscript,Cmd,Powershell 3.0,我有一个名为x.bat的批处理文件,我需要它以不可见的方式运行y.bat 这是 x、 球棒 y、 球棒 当我运行x.bat时,它正在创建不可见的.vbs,但它不会不可见地打开y.bat 如何克服此问题解决方案1:修改您的文件。 将这一行文本另存为文件不可见.vbs: CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False 要以不可见的方式运行任何程序或批处理文件,请如下使用:

我有一个名为x.bat的批处理文件,我需要它以不可见的方式运行y.bat 这是 x、 球棒

y、 球棒

当我运行x.bat时,它正在创建不可见的.vbs,但它不会不可见地打开y.bat
如何克服此问题解决方案1:修改您的文件。

将这一行文本另存为文件
不可见.vbs

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
要以不可见的方式运行任何程序或批处理文件,请如下使用:

wscript.exe "C:\Wherever\invisible.vbs" "C:\Some Other Place\MyBatchFile.bat"
为了能够传递/传递参数列表,只需使用两个双引号

CreateObject("Wscript.Shell").Run "" & WScript.Arguments(0) & "", 0, False
示例:
Invisible.vbs“Kill.vbs ME.exe”

解决方案2:

使用命令行工具以静默方式启动进程:
Quiet
hidecon
hideexec.

可能重复的
wscript.exe "C:\Wherever\invisible.vbs" "C:\Some Other Place\MyBatchFile.bat"
CreateObject("Wscript.Shell").Run "" & WScript.Arguments(0) & "", 0, False