1. An information processing apparatus comprising: a reception unit configured to receive interface information containing a type of a control and an ID of a function corresponding to the control from a printer driver; a first determination unit configured to determine whether an application that invoked the printer driver is being executed in a first execution environment or in a second execution environment; a second determination unit configured to determine whether the printer driver is able to display a user interface for the first execution environment; and a display unit configured to replace the control described in the interface information with a control of a user interface in the second execution environment and display a user interface according to the interface information in which the control described therein was replaced if the first determination unit determined that the application is being executed in the first execution environment and the second determination unit determined that the printer driver is not able to display the user interface for the first execution environment, and display the control of the user interface in the second execution environment according to the interface information if the application is being executed in the second execution environment.