batch script shutdown

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
dell155000
Posts: 2
Joined: 04 Jan 2017 10:38

batch script shutdown

#1 Post by dell155000 » 06 Jan 2017 06:28

Hi,

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

Thnx

Sounak@9434
Posts: 100
Joined: 16 Dec 2016 22:31

Re: batch script shutdown

#2 Post by Sounak@9434 » 06 Jan 2017 08:52

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

Post Reply