Update post-install.bat

Added some detection code to prevent usage where it might fail.