0

I'm trying to make a batch that shut down the specific program in specific time if it's open. Something like this:

:start (
  if %time:~0,5% equ 19.45 (
    taskkill /im "WINWORD.exe"
  )  
  goto :start
)

The problem here is that I don't want it to run on the screen nor to be shown in the taskbar, I want it to run like completely hidden.

Lolman
  • 97
  • 6
  • 1. you can use task scheduler instead 2. maybe this will help: http://stackoverflow.com/questions/649634/how-do-i-run-a-bat-file-in-the-background-from-another-bat-file and http://stackoverflow.com/questions/298562/windows-xp-or-later-windows-how-can-i-run-a-batch-file-in-the-background-with-n – HackR_360 Feb 08 '17 at 18:05
  • 1
    Possible duplicate of [Running a CMD or BAT in silent mode](http://stackoverflow.com/questions/411247/running-a-cmd-or-bat-in-silent-mode) – blaze_125 Feb 08 '17 at 18:07
  • 4
    never build a loop without some idle time (like `timeout -t 1` or similar) else your processor will start smoking. – Stephan Feb 08 '17 at 18:08
  • as an alternative, i suggest you to use `schtasks` command : https://ss64.com/nt/schtasks.html – HackR_360 Feb 08 '17 at 18:16

0 Answers0