Run any application in background

后端 未结 2 617
梦如初夏
梦如初夏 2021-01-24 12:29

Again a VBScript problem.

Here is a working code

Set WshShell = WScript.CreateObject(\"WScript.Shell\") 
WshShell.Run \"\"\"C:\\Program Files\\TrueCrypt\         


        
2条回答
  •  花落未央
    2021-01-24 12:58

    Instead of using the Shell Run method you could try the Create method of the WMI Win32_Process provider.
    The example on this MSDN page creates a configuration object to set the process option ShowWindow to SW_NORMAL (i.e. 1) for a GUI executable - NOTEPAD.EXE.
    On this page it looks like SW_HIDE (with a value of 0) is also an option.

提交回复
热议问题