In the software vending machine S, after the power source is turned on, the electronic control device 20 executes a predetermined initializing processing, such as an operation to set counters of proceeds of sales to zero as will be described later, and then executes a routine for controlling vending of software programs as shown in FIG. 4A.