Patent Description:
To use a peripheral device (to be referred to as a "device" hereinafter) such as a printer from a computer (to be referred to as a "PC" hereinafter), first, a device driver is installed in the PC. Next, a device port in which the destination information (an address, an interface, a protocol, and the like) of the device is set is generated. Then, an icon object (to be referred to as an "icon" hereinafter) identified as a virtual printer device on the OS (Operating System) is generated. At this time, the previously installed device driver and the device port are associated with the icon. Hence, when printing is instructed to the icon, the driver associated with the icon is invoked, and print data is generated. In addition, the print data generated by the driver is transmitted to the device based on the destination information set in the port associated with the icon.

Device drivers installed in a PC are roughly classified into two types. Drivers of one type are drivers provided by the manufacturer of a device, and these are called Outbox drivers. Drivers of the other type are drivers provided by OSs, and these are called Inbox drivers. In general, the Outbox drivers have functions more than those of the Inbox drivers, and from this viewpoint, device manufacturers recommend use of the Outbox drivers.

In a Windows® OS, a device driver can be installed using a function of the OS such as Plug-And-Play or Add Printer Wizard without the use of a driver installer provided from a device manufacturer. If the PC is connected to the Internet, an Outbox driver is downloaded via the Internet by the function of the OS and installed. On the other hand, if the PC is not connected to the Internet, an Inbox driver bundled in the OS in advance is installed.

When installing an Outbox driver in a PC environment where an Inbox driver was already installed, the Inbox driver linked with an icon cannot be replaced. For this reason, the user needs to delete the Inbox driver and an icon (to be referred to as an "Inbox icon" hereinafter) linked with the Inbox driver before installation of the Outbox driver. The user can delete the Inbox driver and the Inbox icon in advance by a method described in <CIT>. <CIT> relates to an information processing apparatus that identifies, from among printers for each of which a first type of printer driver has been installed, a printer for which a second type of printer driver is installable.

In recent years, more appropriate processing for driver installation processing is demanded.

The present invention provides a mechanism capable of implementing more appropriate processing for driver installation processing.

The present invention in its first aspect provides an information processing apparatus as specified in claims <NUM> to <NUM>.

The present invention in its second aspect provides a control method as specified in claim <NUM>.

According to the present invention, when a driver is installed, an icon corresponding to the driver can appropriately be generated.

<FIG> is a block diagram showing an example of the configuration of a network system including an information processing apparatus (PC <NUM>). In the system shown in <FIG>, the PC <NUM>, a device <NUM>, and a router <NUM> are connected to be communicable with each other via a network <NUM>. The apparatuses communicate with each other in accordance with the TCP/IP (Transmission Control Protocol/Internet Protocol) protocol and the UDP. The network <NUM> is connected to an external network <NUM> via the router <NUM>.

The device <NUM> is a peripheral device such as a printer, a copying machine, a facsimile apparatus, or a scanner, or a device having a composite function thereof. The device <NUM> supports a predetermined communication protocol, for example, the TCP/IP protocol. Also, the device <NUM> supports WSD (Web service on Devices) that is a standard network protocol of a Windows OS corresponding to UPnP (Universal Plug and Play). The device <NUM> also supports the LLMNR (Link-Local Multicast Name Resolution) protocol capable of solving the name of a network device in the neighborhood. As for the WSD function and the LLMNR function of the device <NUM>, the enable/disable state of the functions can be switched by directly operating the device <NUM> by the user. The router <NUM> has the DHCP (Dynamic Host Configuration Protocol) server function, and assigns IP addresses to the PC <NUM> and the device <NUM>.

<FIG> is a view showing an example of the configuration of the PC <NUM>. The PC <NUM> includes a monitor <NUM>, a CPU <NUM>, a ROM <NUM>, a RAM <NUM>, an auxiliary storage device <NUM>, a keyboard <NUM>, a pointing device <NUM>, and a network board <NUM>. The constituent elements are connected to each other via a bus <NUM>. The monitor <NUM> displays, for example, a user interface (to be referred to as a "UI" hereinafter) screen of an application such as an application <NUM> or a driver.

The CPU <NUM> generally controls the PC <NUM> and, for example, loads programs such as applications and drivers stored in the ROM <NUM> or the auxiliary storage device <NUM> into the RAM <NUM> and executes them. For example, an operation according to this embodiment is implemented when the CPU <NUM> executes a program loaded into the RAM <NUM>. The ROM <NUM> stores, for example, basic software such as BIOS and various kinds of programs configured to implement processing to be executed in the PC <NUM>. The RAM <NUM> temporarily stores, for example, software such as applications and drivers and data to be used by these. The auxiliary storage device <NUM> is, for example, a hard disk and stores software (programs) such as an OS, applications, drivers, and various modules.

The drivers stored in the auxiliary storage device <NUM> include a device driver (a scanner driver, a printer driver, a FAX driver, or the like) configured to control the device <NUM>. Also, the drivers stored in the auxiliary storage device <NUM> include a display control driver configured to control display on the monitor <NUM>, a keyboard driver configured to control the keyboard <NUM>, and a pointing device driver configured to control the pointing device <NUM>. Furthermore, the drivers stored in the auxiliary storage device <NUM> include a network driver configured to control communication of the network board <NUM>.

The applications stored in the auxiliary storage device <NUM> include the application <NUM> shown in <FIG>. The application <NUM> has a device search function by TCP/IP. Note that the application <NUM> may invoke a module having the search function and cause it to execute the function. The search function may be provided in another module. The keyboard <NUM> and the pointing device <NUM> are input devices configured to input instructions from a user. The network board <NUM> communicates with the device <NUM> via the network <NUM>.

<FIG> is a view showing an example of the configuration of the device <NUM>. <FIG> shows an example of a hardware configuration in a case in which the device <NUM> is a printer. The device <NUM> includes a CPU <NUM>, a ROM <NUM>, a RAM <NUM>, a communication unit <NUM>, a printing unit <NUM>, an operation unit <NUM>, and a display unit <NUM>. Various kinds of constituent elements that constitute the device <NUM> are connected to each other via a bus <NUM>.

The CPU <NUM> is, for example, a microprocessor. The CPU <NUM> functions as the central processing unit of the device <NUM>, and generally controls the device <NUM>. The CPU <NUM>, for example, loads programs stored in the ROM <NUM> into the RAM <NUM> and executes the loaded programs, thereby controlling the communication unit <NUM>, the printing unit <NUM>, the operation unit <NUM>, and the display unit <NUM>. The ROM <NUM> stores, for example, various kinds of programs configured to implement processing to be executed by the device <NUM>. The RAM <NUM> is used as, for example, the work area of the CPU <NUM> and temporarily stores various kinds of data.

The communication unit <NUM> communicates with another device via the network <NUM>. The printing unit <NUM> performs printing on a print medium such as paper based on, for example, image data. The operation unit <NUM> is configured to include input devices such as buttons and a touch panel. The display unit <NUM> displays, for example, a UI configured to operate the device <NUM> and various kinds of information of the device <NUM>. Note that if the device <NUM> is a device other than a printer, the device <NUM> includes another constituent element in place of the printing unit <NUM> or in addition to the printing unit <NUM>. For example, if the device <NUM> is a scanner, the device <NUM> includes a reading unit configured to optically read an image on an original.

An example of a problem assumed in this embodiment will be described here. For example, Windows <NUM>® is equipped with a Microsoft IPP (Internet Printing Protocol) Class Driver (to be referred to as an "IPP driver" hereinafter) as a standard. If an installation target device supports the IPP driver, the IPP driver can be installed using Add Printer Wizard. A WSD (Web service on Devices) port is linked with an icon (to be referred to as a "WSD icon" hereinafter) generated at this time.

Normally, when the WSD icon is deleted, the WSD port linked with the icon is also automatically deleted. However, in the case of the WSD icon generated in linkage with the IPP driver, even if the WSD icon is deleted, the WSD port may remain. If an Outbox driver is installed in the PC environment where the WSD port linked with the IPP driver remains, it may be impossible to generate a new WSD icon because of the remaining WSD port.

<FIG> is a block diagram showing an example of the configuration of an application that communicates with the device <NUM>. As shown in <FIG>, the PC <NUM> holds the application <NUM>, a driver INF file <NUM>, a printer driver <NUM>, a scanner driver <NUM>, and a FAX driver <NUM>.

The application <NUM> is a driver installer that installs the driver of a device in the PC <NUM>. The application <NUM> searches for the device <NUM> connected to the PC <NUM>, and causes the monitor <NUM> to display information concerning the device detected by the search. The application <NUM> then installs, in the PC <NUM>, the driver of a device corresponding to information selected by the user from the pieces of displayed information.

The driver INF file <NUM> includes driver information corresponding to the driver to be installed by the application <NUM> (at least one of the printer driver <NUM>, the scanner driver <NUM>, and the FAX driver <NUM>). The driver information includes, for example, the model information of the driver.

The application <NUM> includes a device search module <NUM>, a detected device output module <NUM>, a driver installation module <NUM>, a generation port type determination module <NUM>, a divertible icon detection module <NUM>, and a new port/icon generation module <NUM>. The modules shown in <FIG> are implemented when the CPU <NUM> of the PC <NUM> reads out the application <NUM> stored in the auxiliary storage device <NUM> and executes it. In this embodiment, the application <NUM> searches for a device in the same network and displays the detected device on the monitor <NUM>. On the other hand, if a device in the same network cannot be searched, the application <NUM> displays, on the monitor <NUM>, a message representing that no device can be detected.

The device search module <NUM> compares the device name information of a target device acquired from the driver INF file <NUM> including driver information with the device name information of a device searched by the device search module <NUM>. Here, the target device indicates the model of a device that the application <NUM> supports. If the device name information of the device searched by the device search module <NUM> matches the device name information of the target device acquired from the driver INF file <NUM>, the detected device output module <NUM> displays the detected device on the monitor <NUM>. The user can select a desired device from the list of devices displayed on the monitor <NUM>.

The driver installation module <NUM> installs a driver corresponding to the device (to be referred to as a "desired device" hereinafter) selected by the user from the devices displayed by the detected device output module <NUM>. Note that the driver to be installed changes depending on the type of the device selected by the user from the devices displayed by the detected device output module <NUM>. For example, if the device selected by the user is a printer, the application <NUM> installs the printer driver <NUM> in the PC <NUM>. If the device selected by the user is a scanner, the application <NUM> installs the scanner driver <NUM> in the PC <NUM>. The device selected by the user may be an MFP (Multi-Function Printer). In this case, the application <NUM> installs, in the PC <NUM>, at least one of the printer driver <NUM>, the scanner driver <NUM>, and the FAX driver <NUM>. For example, if the MFP has a scanner function and a print function, the printer driver <NUM> and the scanner driver <NUM> are installed. Also, for example, if the MFP has a scanner functions, a print function, and a FAX function, the printer driver <NUM>, the scanner driver <NUM>, and the FAX driver <NUM> are installed. If an Inbox driver corresponding to the desired device is linked with an icon already registered in the PC, the linked Inbox driver can be replaced with an Outbox driver provided from the manufacturer of the device while keeping the icon as it is. In this embodiment, a case will be described, in which an Outbox driver is installed by the device installer, thereby replacing an Inbox driver with the Outbox driver.

The generation port type determination module <NUM> communicates with the device <NUM> and specifies the type of a port (port type) that can be generated in the PC <NUM>. The divertible icon detection module <NUM> detects a divertible icon from existing icons already registered in the PC <NUM>. In this embodiment, a divertible icon indicates an icon linked with a driver installed by the driver installation module <NUM> and also linked with a port capable of communicating with the device <NUM>. The new port/icon generation module <NUM> newly generates an icon and a port capable of communicating with the device <NUM> based on the port type specified by the generation port type determination module <NUM>.

<FIG> is a view showing an example of a UI screen of the application <NUM>, which shows a device detection result displayed on the monitor <NUM> by the detected device output module <NUM>. Each item shown in <FIG> will be described later.

<FIG> is a view showing an example of a UI screen of the application <NUM>. The screen shown in <FIG> is displayed when the application <NUM> is executing the driver installation module <NUM>, the generation port type determination module <NUM>, the divertible icon detection module <NUM>, and the new port/icon generation module <NUM>. An installation screen <NUM> includes an internal processing status <NUM> representing the status of internal processing. For example, if the application <NUM> is executing processing of the driver installation module <NUM>, a message such as "installing driver. " and a progress bar <NUM> are displayed in the internal processing status <NUM>.

<FIG> is a view showing an example of a UI screen of the application <NUM>, which is displayed when the internal processing in <FIG> is completed. For example, if the processing of the driver installation module <NUM> is completed, the message <NUM> representing completion of installation is displayed.

<FIG> is a flowchart showing processing from activation of the application <NUM> to an end. First, when the application <NUM> is activated, the application <NUM> displays a device search result screen <NUM> shown in <FIG>. The application <NUM> displays the default screen of the device search result screen <NUM> and then automatically starts searching for a device connected to the PC <NUM> without intervention of a user operation (step S701). At this time, not only devices on the network but also devices connected by different interfaces (for example, a USB (Universal Serial Bus) cable) may be searched for simultaneously. When the device search is ended (YES in step S702), the application <NUM> displays detected devices in a device list <NUM>. The application <NUM> accepts selection of a desired device from the device list shown in <FIG> and pressing of an installation start button <NUM> by the user (step S703). On the other hand, if the device desired by the user cannot be found in the device list <NUM>, or no devices are displayed in the device list <NUM>, the user presses a re-search button <NUM>. When the user operation is accepted, device search is executed again by the device search module <NUM>. Note that when the re-search button <NUM> is pressed, the application <NUM> clears the contents of the device list <NUM>.

When the selection of the desired device from the detected devices is accepted, and the installation start button <NUM> is pressed, the application <NUM> switches the UI from the device search result screen <NUM> to the driver installation screen <NUM>. At this time, the application <NUM> stores the network information (an IP address and the like) of the selected device (step S704). Note that the network information is acquired from each device searched at the time of device search in step S701. When the UI switches to the driver installation screen <NUM>, the application <NUM> executes installation processing of the selected device (step S705). The application <NUM> executes generation port type determination processing (step S706) in <FIG> to be described later and divertible icon detection processing (step S707) shown in <FIG> to be described later in this order. The driver installation processing (step S705) is executed by the driver installation module <NUM>. The generation port type determination processing (step S706) is executed by the generation port type determination module <NUM>. The divertible icon detection processing (step S707) is executed by the divertible icon detection module <NUM>.

The application <NUM> determines whether a divertible icon is detected by the divertible icon detection processing (step S707) (step S708). If no divertible icon is detected in step S707 (NO in step S708), new port/icon generation processing is executed by the new port/icon generation module <NUM> (step S709). In the new port/icon generation processing, new ports and icons linked with the various kinds of drivers <NUM> to <NUM> installed by the driver installation module <NUM> are generated based on the port type determined by the generation port type determination processing. The processing of step S709 will be described later with reference to <FIG>.

On the other hand, if a divertible icon is detected by the divertible icon detection processing of step S707 (YES in step S708), the application <NUM> does not generate a new port/icon and uses the detected divertible icon (step S710). That is, the divertible icon is directly used, and the driver linked with the divertible icon is changed to the driver installed in step S705. When the processing of step S709 or S710 ends, the application <NUM> displays the screen shown in <FIG>, which represents that the installation processing is completed. At this time, when the user presses an end button <NUM>, the processing shown in <FIG> is ended.

<FIG> is a flowchart showing generation port type determination processing (step S706) in <FIG>. In <FIG>, priority orders are set to communication ports, and determination processing of the type of a port to be generated is executed in the descending order of priority orders of the ports. The priorities of ports according to this embodiment are set in the order of WSD and TCP/IP. First, the generation port type determination module <NUM> executes network device search processing by the WSD protocol (step S801). That is, the generation port type determination module <NUM> searches for a device connected to the network <NUM> in accordance with the WSD protocol.

The generation port type determination module <NUM> determines whether a device that matches the network information of the desired device stored in step S704 is detected as the result of the device search (step S802). For example, the generation port type determination module <NUM> determines whether a device that has the same IP address as the IP address stored in step S704 is detected by the search processing of step S801. If a device that matches the network information of the desired device stored in step S704 is detected (YES in step S802), the generation port type determination module <NUM> judges that the type of the port to be generated is WSD (step S803). After step S803, the generation port type determination module <NUM> holds the UUID of the device acquired at the time of the network device search by the WSD protocol (step S804), and ends the processing shown in <FIG>. On the other hand, if a device that matches the network information of the desired device stored in step S704 is not detected (NO in step S802), the generation port type determination module <NUM> determines that the type of the port to be generated is TCP/IP protocol (step S805), and ends the processing shown in <FIG>.

<FIG> is a flowchart showing divertible icon detection processing (step S707) in <FIG>. First, the divertible icon detection module <NUM> determines whether the type of the port to be generated is WSD or TCP/IP as the result of generation port type determination processing of step S706 (step S901). If the type of the port to be generated is WSD (YES in step S901), the divertible icon detection module <NUM> executes divertible WSD icon detection processing shown in <FIG> to be described later (step S902). On the other hand, if the type of the port to be generated is TCP/IP (NO in step S901), the divertible icon detection module <NUM> executes divertible TCP/IP icon detection processing shown in <FIG> to be described later (step S903). After step S902 or S903, the divertible icon detection module <NUM> ends the processing shown in <FIG>.

<FIG> is a flowchart showing divertible WSD icon detection processing (step S902) in <FIG>. First, the divertible icon detection module <NUM> acquires the icon information of all icons registered in the PC <NUM> (step S1001). Note that the icon information includes, for example, a driver name, a port type, a port name, and the like linked with the icon. After the icon information is acquired, the divertible icon detection module <NUM> starts loop processing for searching for a divertible WSD icon for all pieces of icon information acquired in step S1001 (step S1002). In the loop processing, first, the divertible icon detection module <NUM> determines whether a driver name linked with a check target icon that is the target of the loop processing matches the name of the driver installed in step S705 (step S1003). If the driver name linked with the icon of the check target does not match the name of the installed driver (NO in step S1003), the divertible icon detection module <NUM> starts check of the icon information of the next icon. On the other hand, if the driver name linked with the icon matches the name of the installed driver (YES in step S1003), the divertible icon detection module <NUM> determines whether the type of the port linked with the check target icon is WSD (step S1004).

If the type of the port linked with the icon is not WSD (NO in step S1004), the divertible icon detection module <NUM> starts check of the next icon. On the other hand, if the type of the port linked with the icon is WSD (YES in step S1004), the divertible icon detection module <NUM> determines whether the UUID set in the WSD port matches the UUID of the device held in step S804 (step S1005). More specifically, the divertible icon detection module <NUM> acquires a UUID corresponding to the port name acquired in step S1001 from a UUID management module. Step S1005 is executed using the UUID acquired here.

As described above, in steps S1003 to S1005, as the result of icon determination, a divertible WSD icon that satisfies the conditions is detected.

If the UUIDs do not match (NO in step S1005), the divertible icon detection module <NUM> starts check of the next icon. On the other hand, if the UUIDs match (YES in step S1005), the divertible icon detection module <NUM> ends the loop processing, judges that a divertible WSD icon is detected (step S1006), and then ends the processing shown in <FIG>. On the other hand, if the loop processing is performed for all icons, the divertible icon detection module <NUM> judges that there is no divertible WSD icon (step S1007), and then ends the processing shown in <FIG>.

<FIG> is a flowchart showing divertible TCP/IP icon detection processing (step S903) in <FIG>. First, the divertible icon detection module <NUM> acquires the icon information of all icons registered in the PC <NUM> (step S1101). After the icon information is acquired, the divertible icon detection module <NUM> starts loop processing for searching for a divertible TCP/IP icon for all pieces of icon information acquired in step S1101 (step S1102). In the loop processing, first, the divertible icon detection module <NUM> determines whether a driver name linked with a check target icon that is the target of the loop processing matches the name of the driver installed in step S705 (step S1103). If the driver name linked with the icon does not match the name of the installed driver (NO in step S1103), the divertible icon detection module <NUM> starts check of the icon information of the next icon. On the other hand, if the driver name linked with the icon of the check target matches the name of the installed driver (YES in step S1103), the divertible icon detection module <NUM> determines whether the type of the port linked with the check target icon is TCP/IP (step S1104).

If the port linked with the icon is not TCP/IP (NO in step S1104), the divertible icon detection module <NUM> starts check of the icon information of the next icon. On the other hand, if the port linked with the icon is TCP/IP (YES in step S1104), the process advances to step S1105. The divertible icon detection module <NUM> determines whether the network information set to the TCP/IP port matches the network information of the device held in step S704 (step S1105). The network information is, for example, an IP address.

As described above, in steps S1103 to S1105, as the result of icon determination, a divertible TCP/IP icon that satisfies the conditions is detected.

If the pieces of network information do not match (NO in step S1105), the divertible icon detection module <NUM> starts check of the icon information of the next icon. On the other hand, if the pieces of network information match (YES in step S1105), the divertible icon detection module <NUM> ends the loop processing, judges that a divertible TCP/IP icon is detected (step S1106), and then ends the processing shown in <FIG>. On the other hand, if the loop processing is performed for all icons, the divertible icon detection module <NUM> judges that there is no divertible TCP/IP icon (step S1107), and then ends the processing shown in <FIG>.

<FIG> is a flowchart showing new port/icon generation processing (step S709) in <FIG>. First, the new port/icon generation module <NUM> determines whether the port type determined by the generation port type determination processing of step S706 is WSD or TCP/IP (step S1201). If the port type determined by the generation port type determination processing of step S706 is TCP/IP (NO in step S1201), the new port/icon generation module <NUM> generates a new port/icon by TCP/IP (step S1205).

On the other hand, if the port type determined by the generation port type determination processing of step S706 is WSD (YES in step S1201), the new port/icon generation module <NUM> starts new WSD port/icon generation processing in <FIG> to be described later (step S1202). The new port/icon generation module <NUM> determines whether generation of a new WSD port/icon has succeeded (step S1203).

If generation of a new WSD port/icon has succeeded (YES in step S1203), the new port/icon generation module <NUM> judges that generation of a WSD icon has succeeded (step S1204) and then ends the processing shown in <FIG>. On the other hand, if generation of a new WSD port/icon has failed (NO in step S1203), the new port/icon generation module <NUM> generates a new port/icon by TCP/IP instead (step S1205). After step S1205, the new port/icon generation module <NUM> ends the processing shown in <FIG>.

<FIG> is a flowchart showing new WSD port/icon generation processing (step S1202) in <FIG>. First, the new port/icon generation module <NUM> acquires all ports registered in the PC <NUM> (step S1301). When all ports registered in the PC <NUM> are acquired, the new port/icon generation module <NUM> executes a new WSD port/icon generation API (step S1302). Note that when the new WSD port/icon generation API is executed, an icon and a WSD port for the icon are generated. The new port/icon generation module <NUM> determines whether a reply from the new WSD port/icon generation API indicates a success or a failure (step S1303).

If the reply from the new WSD port/icon generation API indicates a failure (NO in step S1303), the new port/icon generation module <NUM> judges that the WSD icon generation has failed (step S1304), and then ends the processing shown in <FIG>. On the other hand, if the reply from the new WSD port/icon generation API indicates a success (YES in step S1303), the new port/icon generation module <NUM> acquires all ports registered in the PC <NUM> again (step S1305).

When all ports registered in the PC <NUM> are acquired, the new port/icon generation module <NUM> determines whether the number of ports acquired in step S1305 is larger than the number of ports acquired in step S1301 (step S1306). If the number of ports acquired in step S1305 is not larger than the number of ports acquired in step S1301 (that is, the number of ports has not increased) (NO in step S1306), the new port/icon generation module <NUM> judges that the WSD icon generation has failed (step S1304). After step S1304, the processing shown in <FIG> is ended.

On the other hand, if the number of ports acquired in step S1305 is larger than the number of ports acquired in step S1301 (that is, the number of ports has increased) (YES in step S1306), the process advances to step S1307. The new port/icon generation module <NUM> attempts to acquire a UUID set to the newly generated new WSD port and determines whether the acquisition has succeeded (step S1307). More specifically, the new port/icon generation module <NUM> specifies a port corresponding to the increase in step S1306 as a new port. The new port/icon generation module <NUM> attempts to acquire the UUID of the port name specified as the new port. If acquisition of the UUID of the newly generated WSD port has failed (NO in step S1307), the new port/icon generation module <NUM> judges that the WSD icon generation has failed (step S1304), and then ends the processing shown in <FIG>.

On the other hand, if acquisition of the UUID of the newly generated WSD port has succeeded (YES in step S1307), the process advances to step S1308. The new port/icon generation module <NUM> determines whether the UUID of the new WSD port acquired in step S1307 matches the UUID of the device held in step S804 (step S1308). If the UUID of the new WSD port acquired in step S1307 does not match the UUID of the device held in step S804 (NO in step S1308), the new port/icon generation module <NUM> judges that the WSD icon generation has failed (step S1304). After step S1304, the new port/icon generation module <NUM> ends the processing shown in <FIG>.

On the other hand, if the UUID of the new WSD port acquired in step S1307 matches the UUID of the device held in step S804 (YES in step S1308), the new port/icon generation module <NUM> judges that the WSD icon generation has succeeded (step S1309). After step S1309, the new port/icon generation module <NUM> ends the processing shown in <FIG>.

As described above, according to this embodiment, if the application <NUM> judges, as the result of port determination, that there is no divertible icon that satisfies the conditions, the new port/icon generation processing shown in <FIG> is executed. In the new port/icon generation processing, the application <NUM> compares the numbers of ports acquired before and after execution of the new WSD port/icon generation API, and judges, based on the comparison result, whether a new WSD icon is generated. With this configuration, even if a port that impedes new WSD icon generation remains in the PC <NUM>, and generation of the new WSD icon fails, the application <NUM> can generate a new icon by another port (TCP/IP port). As a result, it is possible to prevent a situation that an icon that should be an operation target for the user is not generated because of the remaining port. In addition, since it is determined, based on the UUID set to the new WSD port, whether the new WSD port is a WSD port linked with the desired printer, it is possible to more correctly determine whether generation of the new WSD icon has succeeded.

Note that although in this embodiment, an example in which a WSD port and a TCP/IP port are used in the generation port type determination processing of step S706 has been described, the present embodiment is not limited to this. For example, another protocol such as the IPP (Internet Printing Protocol) may be added to the determination processing, or the protocols may be replaced. Also, in this embodiment, the priorities of communication ports to be generated are set in the order of WSD and TCP/IP. However, for example, another protocol may be added, like WSD, TCP/IP, and IPP. Alternatively, the priority orders may be changed in accordance with the state of the application <NUM> or the device <NUM>.

Also, in this embodiment, the application <NUM> automatically determines the communication port without intervention of a user operation. However, for example, a screen configured to newly designate a generation port may be displayed on the UI of the application, and the user may designate a communication port to be generated. At this time, if generation by the designated communication port has failed, a screen that notifies that generation by the designated communication port has failed may be displayed, or the application <NUM> may automatically determine and generate an alternate communication port without intervention of a user operation.

Also, in this embodiment, after the user selects the desired device on the device search result screen <NUM> in step S703, the generation port type determination processing of step S706 is executed. However, the generation port type determination processing of step S706 may be executed immediately after a device is detected in the device search processing of step S701. On the other hand, a device connected by a plurality of interfaces (for example, a network and a USB) may be searched for. In this case, if the generation port type determination processing of step S706 is executed immediately after the device search processing of step S701, and the user selects a USB device, the generation port type determination processing may be meaningless. Hence, when searching for a device for a plurality of interfaces, after the user specifies a desired device and a desired interface, the generation port type determination processing of step S706 (step S706) may be executed as needed. With this configuration, the processing efficiency can be improved by reducing packets to be transmitted.

The second embodiment will be described below concerning points different from the first embodiment. As described in the first embodiment, even if a port that impedes new WSD icon generation remains in a PC <NUM>, and generation of a new WSD icon fails, an application <NUM> can generate a new icon by another port.

In this embodiment, the following use case will further be assumed. For example, the installation target device is assumed to be a device (for example, MFP) that supports a plurality of functions like print and FAX. In addition, for the installation target device, a WSD icon and a WSD port are generated in the PC <NUM> when the IPP driver is installed by the function of the OS. After that, the WSD icon is deleted by a user operation, and only the WSD port remains. If installation by the installer is performed in such a PC environment, first, printer driver installation processing and printer icon generation processing (step S709) or use of a divertible icon for a printer (step S710) is performed by processing according to the above-described first embodiment. Then, only a WSD icon for the FAX function is generated by diverting the remaining WSD port. This is because although the FAX function supports the WSD port, but the IPP driver does not support the FAX function.

In the use case as described above, the application <NUM> determines, based on the absence of a change in the number of ports registered in the PC <NUM>, that WSD icon generation has failed, and executes generation of a TCP/IP port. In this case, two FAX icons for the WSD port and the TCP/IP port are generated. In this embodiment, even in the use case as described above, it is possible to prevent two FAX icons for the WSD port and the TCP/IP port from being generated redundantly.

<FIG> is a flowchart showing new WSD port/icon generation processing (step S1202) in <FIG> in this embodiment. First, a new port/icon generation module <NUM> acquires all ports and all icons registered in the PC <NUM> (steps S1401 and S1402). After steps S1401 and S1402, the new port/icon generation module <NUM> executes a new WSD port/icon generation API (step S1403). The new port/icon generation module <NUM> determines whether a reply from the new WSD port/icon generation API indicates a success or a failure (step S1404).

If the reply from the new WSD port/icon generation API indicates a failure (NO in step S1404), the new port/icon generation module <NUM> judges that the WSD icon generation has failed (step S1405), and then ends the processing shown in <FIG>. On the other hand, if the reply from the new WSD port/icon generation API indicates a success (YES in step S1404), the new port/icon generation module <NUM> acquires all ports registered in the PC <NUM> again (step S1406).

When all ports registered in the PC <NUM> are acquired, the new port/icon generation module <NUM> determines whether the number of ports acquired in step S1406 is larger than the number of ports acquired in step S1401 (step S1407). If the number of ports acquired in step S1406 is not larger than the number of ports acquired in step S1401 (that is, the number of ports has not increased) (NO in step S1407), the new port/icon generation module <NUM> executes unnecessary WSD icon deletion processing shown in <FIG> to be described later (step S1408). After completion of the unnecessary WSD icon deletion processing, the new port/icon generation module <NUM> judges that the WSD icon generation has failed (step S1405). After that, the processing shown in <FIG> is ended.

On the other hand, if the number of ports acquired in step S1406 is larger than the number of ports acquired in step S1401 (that is, the number of ports has increased) (YES in step S1407), the process advances to step S1409. The new port/icon generation module <NUM> attempts to acquire a UUID set to the newly generated new WSD port and determines whether the acquisition has succeeded or failed(step S1409). If acquisition of the UUID of the newly generated new WSD port has failed (NO in step S1409), the new port/icon generation module <NUM> judges that the WSD icon generation has failed (step S1405), and then ends the processing shown in <FIG>.

On the other hand, if acquisition of the UUID of the newly generated new WSD port has succeeded (YES in step S1409), the process advances to step S1410. The new port/icon generation module <NUM> determines whether the UUID of the new WSD port acquired in step S1409 matches the UUID of the device held in step S804 (step S1410). If the UUID of the new WSD port acquired in step S1409 does not match the UUID of the device held in step S804 (NO in step S1410), the new port/icon generation module <NUM> judges that the WSD icon generation has failed (step S1405). After step S1405, the new port/icon generation module <NUM> ends the processing shown in <FIG>.

On the other hand, if the UUID of the new WSD port acquired in step S1409 matches the UUID of the device held in step S804 (YES in step S1410), the new port/icon generation module <NUM> judges that the WSD icon generation has succeeded (step S1411). After step S1411, the new port/icon generation module <NUM> ends the processing shown in <FIG>.

<FIG> is a flowchart showing unnecessary WSD icon deletion processing (step S1408) in <FIG>. First, the new port/icon generation module <NUM> acquires all icons registered in the PC <NUM> (step S1501). The new port/icon generation module <NUM> determines whether the number of icons acquired in step S1501 is larger than the number of icons acquired in step S1402 (step S1502). If the number of icons acquired in step S1501 is not larger than the number of icons acquired in step S1402 (that is, the number of icons has not increased) (NO in step S1502), the new port/icon generation module <NUM> ends the processing shown in <FIG>. On the other hand, if the number of icons acquired in step S1501 is larger than the number of icons acquired in step S1402 (that is, the number of icons has increased) (YES in step S1502), the process advances to step S1503. The new port/icon generation module <NUM> determines whether the port linked with the newly generated new icon is WSD (step S1503).

If the port linked with the new icon is not WSD (NO in step S1503), the new port/icon generation module <NUM> ends the processing shown in <FIG>. On the other hand, if the port linked with the new icon is WSD (YES in step S1503), the new port/icon generation module <NUM> determines whether a driver name linked with the new icon matches the name of the driver installed in step S705 (step S1504).

If the driver name linked with the new icon does not match the name of the driver installed in step S705 (NO in step S1504), the new port/icon generation module <NUM> ends the processing shown in <FIG>. On the other hand, if the driver name linked with the new icon matches the name of the driver installed in step S705 (YES in step S1504), the new port/icon generation module <NUM> deletes the new icon (step S1505), and then ends the processing shown in <FIG>.

As described above, according to this embodiment, it is possible to prevent a plurality of function icons (for example, for WSD and TCP/IP) port from being generated redundantly. Also, in this embodiment, after the WSD icon is deleted, a TCP/IP icon is generated in the processing shown in <FIG>. However, another processing may be executed to prevent two FAX icons for the WSD port and the TCP/IP port from being generated. For example, only a print icon may be generated without deleting the FAX WSD icon generated in step S1403 and generating a FAX icon at the time of TCP/IP icon generation.

Also, in this embodiment, after the new WSD port/icon generation API is executed in step S1403, all icons registered in the PC <NUM> are acquired in step S1501. At this time, the following configuration may be employed. For example, if the WSD icon is not immediately generated because of the low-spec PC <NUM>, after waiting for a predetermined time, all icons may be acquired in step S1501. In addition, if the number of icons has no change at the time of icon count determination of step S1502 (that is, NO in step S1502), the icon count determination processing of step S1502 may be repeated for a predetermined time. With this configuration, it is possible to perform appropriate determination in consideration of the processing time of the PC concerning icon generation processing.

The third embodiment will be described below concerning points different from the first and second embodiments. In the first and second embodiments, after new WSD icon generation API execution processing (steps S1302 and S1403), it is determined whether a new WSD icon has been normally generated, as described above. In this embodiment, before the new WSD icon generation API is executed, it is determined whether a WSD port that impedes new WSD icon generation remains.

<FIG> is a flowchart showing new WSD port/icon generation processing (step S1202) in <FIG> according to this embodiment. First, a new port/icon generation module <NUM> executes existing WSD port check processing shown in <FIG>, in which it is determined whether an existing WSD port that impedes new WSD port/icon generation is registered in a PC <NUM> (step S1601). The new port/icon generation module <NUM> then determines whether an existing WSD port that impedes new WSD port/icon generation is detected from the PC <NUM> (step S1602).

If an existing WSD port that impedes new WSD port/icon generation is detected from the PC <NUM> (YES in step S1602), the new port/icon generation module <NUM> judges that a new WSD port cannot be generated (step S1603), and then ends the processing shown in <FIG>. On the other hand, if an existing WSD port that impedes new WSD port/icon generation is not detected from the PC <NUM> (NO in step S1602), the new port/icon generation module <NUM> executes new WSD icon generation API execution processing (step S1604). The new port/icon generation module <NUM> determines whether a reply from the new WSD port/icon generation API indicates a success or a failure (step S1605).

If the reply from the new WSD icon generation API indicates a failure (NO in step S1605), the new port/icon generation module <NUM> judges that new WSD icon generation is impossible (step S1603), and then ends the processing shown in <FIG>. On the other hand, if the reply from the new WSD icon generation API indicates a success (YES in step S1605), the new port/icon generation module <NUM> judges that new WSD icon generation has succeeded (step S1606), and then ends the processing shown in <FIG>. After step S1603, in step S1203 of <FIG>, it may be determined that the new WSD port/icon generation has failed.

<FIG> is a flowchart showing existing WSD port check processing (step S1601) in <FIG>. First, the new port/icon generation module <NUM> acquires all ports registered in the PC (step S1701). Then, the new port/icon generation module <NUM> starts loop processing for checking the presence/absence of a WSD port that impedes new WSD icon generation in the acquired ports (step S1702).

In the loop processing, first, the new port/icon generation module <NUM> determines whether the check target port that is the target of the loop processing is a WSD port (step S1703). If the check target port is not a WSD port (NO in step S1703), the new port/icon generation module <NUM> switches the check target port to another port and repeats the loop processing. On the other hand, if the check target port is a WSD port (YES in step S1703), the process advances to step S1704. The new port/icon generation module <NUM> determines whether a UUID set to the check target port matches the UUID of the device held in step S804 (step S1704).

If the UUID set to the check target port does not match the UUID of the device held in step S804 (NO in step S1704), the new port/icon generation module <NUM> switches the check target port to another port and repeats the loop processing. On the other hand, if the UUID set to the check target port matches the UUID of the device held in step S804 (NO in step S1704), the process advances to step S1705. The new port/icon generation module <NUM> determines whether an IPP PortID is set to the check target port (S1705).

If an IPP PortID is not set to the check target port (NO in S1705), the new port/icon generation module <NUM> switches the check target port to another port and repeats the loop processing. On the other hand, if an IPP PortID is set to the check target port (YES in S1705), the process advances to step S1706. The new port/icon generation module <NUM> judges that the communication port is a WSD port that impedes new WSD icon generation (step S1706), and then ends the processing shown in <FIG>. That is, in step S1706, it is judged that an existing WSD port that impedes new WSD port/icon generation is detected from the PC <NUM>. On the other hand, if the loop processing is ended without advancing to step S1706, the new port/icon generation module <NUM> judges that new WSD icon generation is possible (step S1707), and then ends the processing shown in <FIG>. That is, in step S1707, it is judged that an existing WSD port that impedes new WSD port/icon generation is not detected from the PC <NUM>.

As described above, according to this embodiment, before the new WSD icon generation API is executed, the new port/icon generation module <NUM> can determine whether a WSD port that impedes new WSD icon generation remains. Hence, if a WSD port remains, the processing of the new WSD icon generation API is skipped. It is therefore possible to improve the processing efficiency of the application <NUM>.

To apprise the public of the scope of the present invention, the following claims are made.

Claim 1:
An information processing apparatus (<NUM>) capable of communicating with a device (<NUM>), comprising:
installation means configured to install a driver corresponding to the device (<NUM>);
a first generation means configured to generate (S1302) an icon corresponding to the driver installed by the installation means and corresponding to a first type, wherein a port of a first port type (WSD) is generated when the icon corresponding to the first type is generated;
a second generation means configured to generate (S1205) an icon corresponding to the driver installed by the installation means and corresponding to a second type;
characterized by
a port determination means for determining (S706) whether or not a port of the first type (WSD) is to be generated;
an acquisition means for acquiring (<NUM>, S1305), in a case (S1201:YES) where the port determination means has determined that a port of the first type (WSD) is to be generated, the number of ports registered in the information processing apparatus (<NUM>) before (S1301) and after (S1305) an icon generation process is executed by the first generation means;
control means configured to
determine (S1304) that the icon generation process executed by the first generation means has failed if the number of ports acquired by the acquisition means has not increased as compared to before the execution of the icon generation process (S1306:NO), and
generate (S1205), if it has determined (S1203:NO) that the icon generation process executed by the first generation means has failed, by the second generation means, an icon corresponding to the driver installed by the installation means and corresponding to the second type.