The IPIVR 4.0.4 install media is also used for upgrades. The instructions are located in this doc chapter 7: http://www.cisco.com/application/pdf/en/us/guest/products/ps6488/c1097/ccmigration_09186a00806690b2.pdf
FYI there are a lot of issues with upgrades from 3x to 4.0.4. I would highly recommend going to 4.0.5 as the upgrade process was reworked in this version to deal with these issues. If you must go to 4.0.4, I would recommend rebuilding the OS from scratch after the uninstall step of the upgrade is complete, then performing a restore with the backed up data (this is how the upgrade is handled in 4.0.5, see the 4.0.5 install doc for details).