batch file - close a windows bat and do some actions -
here question want close windows bat dos window directly, , when close action invoked, actions or bat should invoked, how can implement this?
what doing : start bat, , bat start 2 processes, when dos bat closed,the 2 process should closed. users close dos window directly,don't use stop.bat provided, thinking possible catch user's close action , something!!
thank !!!!
well, have solved problem. main idea [windows shutdown hook on java application run bat script], answer has bug, if close bat or cmd forcibly,the action may not invoked, reason here jvm shutdown before java code action invoked. put action in native method.
Comments
Post a Comment