Page 1 of 1

batch script shutdown

Posted: 06 Jan 2017 06:28
by dell155000
Hi,

Is it possible to create a batch script that closes a program first before the PC is shutting down.

Thnx

Re: batch script shutdown

Posted: 06 Jan 2017 08:52
by Sounak@9434
As aGermen said in your last question a batch script not running can't do anything.
Though if you are triggering shutdown from a batch script(with shutdown command) you can just add a /f switch to force close all open windows or do a 'taskill' command(maybe a taskill and then a delaying loop with tasklist to ensure closing) to close that specific window.

Sounak