Added support for install/upgrade mode

Added support for install/upgrade mode