A method is provided for controlling an electronic apparatus, the electronic apparatus including a USB interface that is used for connecting a USB device of a first device class in a first operation mode controlled by a first control program. The method includes reading, upon connection of a USB device of a second device class different from the first device class to the USB interface, a second control program for controlling a second operation mode from the connected USB device; and starting the second operation mode by storing in a storage unit the second control program and executing the second control program.