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
Batch file 如何使用bat文件创建隐藏窗口?_Batch File_Hidden - Fatal编程技术网

Batch file 如何使用bat文件创建隐藏窗口?

Batch file 如何使用bat文件创建隐藏窗口?,batch-file,hidden,Batch File,Hidden,我需要为用户创建一个具有隐藏进程和窗口的批处理文件 我已经有了我的批处理文件,希望将其中一个隐藏起来 vbs无法实现这一点或任何编程语言?在这里,您可以找到多种方法来实现这一点: 最好的方法可能是使用Win32_ProcessStartup,因为它还返回已启动进程的pid Set WshShell = CreateObject("WScript.Shell") WshShell.Run chr(34) & "C:\file.bat" & Chr(34), 0 Se

我需要为用户创建一个具有隐藏进程和窗口的批处理文件 我已经有了我的批处理文件,希望将其中一个隐藏起来
vbs无法实现这一点或任何编程语言?

在这里,您可以找到多种方法来实现这一点:

最好的方法可能是使用Win32_ProcessStartup,因为它还返回已启动进程的pid

Set WshShell = CreateObject("WScript.Shell")    
WshShell.Run chr(34) & "C:\file.bat" & Chr(34), 0    
Set WshShell = Nothing    

使用Vbs并调用bat文件,这是使用start命令的方式:

start /b my.bat

请参阅:

请详细说明您的问题。