How can I run a windows batch file but hide the command window?

前端 未结 10 1868
情深已故
情深已故 2020-11-30 01:40

How can I run a windows batch file but hiding the command window? I dont want cmd.exe to be visible on screen when the file is being executed. Is this possible?

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-30 02:25

    For any executable file, you can run your program using cmd with "c" parameter:

    cmd /c "your program address"\"YourFileName".bat  
    

    (->if it's a batch file!) As a final solution, I suggest that you create a .cmd file and put this command in it:

    cmd /c "your program address"\"YourFileName".bat
    exit
    

    Now just run this .cmd file.

提交回复
热议问题