in reply to While doing force quiting the exe how to run a bat file

Look at END blocks or %SIG (in perlvar):

END { print "End of program was reached.\n"; };

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.