generic install script for 3.1.1 and 4.0.1