How can I hide ms-dos window when running a .bat file?

后端 未结 4 1471
感情败类
感情败类 2021-01-18 07:48

I am running a .bat file for my script (Scheduled Tak (CronJob)) per minute. When it runs, windows command prompt appears for a fiction of time.

My batch code like

4条回答
  •  忘掉有多难
    2021-01-18 08:40

    I don't like VBScript solution.

    Download and copy nircmd.exe to your %systemroot%\system32 folder, then add this command to first line of your batch:

    nircmd.exe win hide ititle "cmd.exe"
    

    or make your batch title custom first with title command to avoid from hiding all cmd windows, like this:

    title MyBatch
    nircmd.exe win hide ititle "MyBatch"
    

提交回复
热议问题