run bat file in background

后端 未结 3 1594
醉话见心
醉话见心 2020-12-17 03:27

I want to run a bat file in background. I searched in google and I found some examples using hstart and cmdow. But Isn\'t anyway to do this with windows commands? I really f

3条回答
  •  伪装坚强ぢ
    2020-12-17 04:05

    I'm using window scheduler. I found a way :

    Save this one line of text as file invisible.vbs:

    CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
    

    To run any program or batch file invisibly, use it like this:

    wscript.exe "C:\Wherever\invisible.vbs" "C:\Some Other Place\MyBatchFile.bat"
    

    thanx

提交回复
热议问题