how do you solve it when it gets hung ? via task manager --> end process, if that is the case and this is working for you, then batch file will work.
However I would investigate (when I have free time) how ERP software gets feeded (mysql/basic files/what connector it uses) and see if I can try to further understand to help solve the issue.
Secondly, try replacing that Win 7 with 2008R2, and check if program runs more stably using that. I reckon there is still a way to trial 2008R2.
The new version of the ERP software runs on .net so once the upgrade is done, I don't anticipate this being an issue. It honestly is just really bad software and this is an "add-on" piece that no one in support even knows about. I've invested many many hours into trying to fix it and I'm done wasting my time. This will suffice for now.