Method and apparatus for new device driver installation by an operating system6567860Abstract A method and apparatus are disclosed for inputting new device driver information into a Personal Computer (PC) in an existing computer network so as to enable the Operating System (OS) to recognize the new hardware device during installation of the OS and to permit the OS to automatically install the associated device driver. Claims What is claimed is: Description TECHNICAL FIELD
Terminology:
Term Definition
Device A generic term for a computer component, such as a
printer, serial port, disk drive, mouse, display,
sound card, camera, etc. A device frequently requires
its own controlling software called a device driver.
Device Driver A program that enables a specific piece of hardware
(the "device") to communicate with a computer
Operating System (OS). Although a device may be
attached to a computer, typically the OS cannot recognize
the device until the user has installed and configured the
appropriate driver.
INF File Vendor specific INF file for driver information.
Windows INF file This is a file that provides Windows
95/98/NT Setup with the information required to set up
a device, such as a list of valid logical configurations
for the device, the names of driver files for the device,
etc. An INF file is typically provided by the device
manufacturer.
INF file format Windows INF file formats are described in detail in
Appendix C in the Windows 95/98 Resource Kit
documents.
OS Path Directory where the Operating System files are located,
generally described in detail in the Windows 95/98
Resource Kit documents.
Answer file A text file that typically contains pre-defined answers to
questions that might arise during installation (installation
prompts). For example, a user might be prompted to
enter a name, a serial number, a preferred language, etc.
By pre-typing the answers to these questions in a text file
an administrator can help users install software on PCs in
unattended mode. Not all software comes with answer
file capabilities, and answer files may be called by other
names. The format of an answer file is typically
relatively simple, consisting of three components:
sections (specifying groupings of similar keywords),
keywords (corresponding to the prompts that typically
occur when an application installs), and values (responses
to the requests for input).
Hardware tree In Windows systems, a record in Random Access
Memory of the current system configuration, based on
the configuration information for all devices in the
hardware branch of the Registry.
Registry In Windows 95/98/NT systems, the Registry is the
database repository of information about a computer's
configuration.
Setup In Windows 95/98/NT systems, Setup is a program
designed to guide the user/administrator in installing the
particular operating system and in customizing
the installation for the particular hardware and user
through the use of pre-programmed configurations,
safe defaults, and various automated hardware
detection processes.
OPERATING ENVIRONMENT The environment in which the present invention is used encompasses the general distributed computing scene which includes generally local area networks with hubs, routers, gateways, tunnel-servers, applications servers, etc. which may be connected to other clients and other networks via the Internet, wherein programs and data are made available by various members of the network for execution and access by other members of the network. The client machines are typically Personal Computers (PCs). In the preferred embodiment, the LANs are composed of clients and servers running Microsoft Windows Operating Systems (95/98/NT) whose operating environments are generally controlled by either the Microsoft Systems Management Server (SMS) or the Platinum AutoConfigure System. The computer system of the preferred embodiment includes generally the elements shown in FIG. 1, wherein an exemplary general purpose computer 200 includes a cabinet 201 which includes a motherboard 203 having thereon an input/output ("I/O") section 205, one or more central processing units ("CPU") 207, and a memory section 209 which may have a flash memory card 211 related to it. The I/O section 205 is connected to a keyboard 226, other similar general purpose computer units 225, 215, a disk storage unit 223 and a CD-ROM drive unit 217. Alternatively the CD-ROM unit may be replaced by a floppy disk drive unit in some such systems. The CD-ROM drive unit 217 can read a CD-ROM medium 219 which typically contains programs 221 and other data. Logic circuits or other components of these programmed computers will perform series of specifically identified operations dictated by computer programs as described more fully below. FIG. 2 is a general chart showing the relationship between the operating system, device drivers and computer hardware/devices. In FIG. 2 application programs 251 interface with an operating system 253, which in turn communicates with various device drivers 255, which control the various related hardware devices 257 which make up a particular computer architectural configuration. Whenever a new device is added to the hardware configuration 257 generally a corresponding device driver for that new device must be added to the device driver section 255 and connections made with the operating system 253 so that the operating system can communicate with the new piece of hardware. In Windows based systems, the Windows Setup program during system install, detects the hardware devices and components which are already configured on the computer and uses this information to install drivers and set Registry entries. If a user installs support manually for a hardware component that does not appear in the "Readme" file and "Setup.txt" files of the Setup program as being a supported device by the OS, then the user must add the device driver(s) to the system hardware tree and Registry. The present invention provides an automated assist in making the necessary entries as effortless as possible. THE INVENTION The present invention is an apparatus and method for automating the addition of a device driver for a newly installed device for which an existing Operating System may not be configured. In the preferred embodiment, the general process of the invention is depicted in FIG. 3. Referring to FIG. 3 a vendor INF file 305 which contains data and code for and about a newly installed device is identified to an add-device tool by means of a graphical user interface (GUI) 307. Also identified via the GUI 307 are pointers to an OS answer file 301 and to the OS source path 303. The add-device tool takes these inputs and modifies the answer file 309 and OS installation files 311 to add the data and code relating to the new device driver and outputs these files for later use by the OS. Graphical User Interface: In the preferred embodiment, the add-device tool has been provided as a separate utility. Referring now to FIG. 4 an exemplary graphical user interface (GUI) is shown. This GUI is displayed to the user when the add-device tool is invoked. The GUI shown is labeled "Windows 95 Driver Add Utility--Beta Release only" 401 however in the preferred embodiment the GUI for Windows 95/98/NT is the same as that shown in FIG. 4 except the "titles at 401 refer as 95/98/NT. In the preferred embodiment the GUI is used in conjunction with the Platinum AutoConfigure System as labeled "Intel LANDesk Configuration Manager" 402. Using the GUI, the user has to enter the Vendor INF file name 406 in the box labeled "Vendor INF Filename" 404, the Windows Source path 410 in box 408, the Answer file that is going to be used 414 in box 412 and the name of a log file (optional) 418 in box 416. The log file 418 is an ordinary text file which contains the event log of the program. A status bar 422 is shown to the user about the activity of adding the driver's information, depending on the user's selection of the Log detail level 420. The user can use the log file at a later stage, to trouble shoot the reason for the driver not being added in case of the tool's failure to add the drivers to the OS installation files. User selection is validated for the INF file by verifying the version section of the file (which is described further below). User selection of OS path is validated for the existence of the directory and whether it is writeable or not. The system gets all the driver information from the INF file and updates the Answer file and the Custom.Inf file in the source path. If the Custom.Inf file doesn't exist, the tool will create one and adds the required sections to it. If the user has completed the data entry he clicks on the "OK" button 434 and then clicks the close button 436. If at any point in the process the user is unsure of what to enter he can click on the "Help" button 438 and a separate "help" GUI will be displayed indicating general instructions for what must/can be done for each entry required. The user can either enter,the filename, and paths (as indicated in 406, 410, 414 and 418) or he can use the browse button 426, 428, 430 or 432 to select the required files and directories. If the user selects any of the browse buttons he will get a screen like the one shown in FIG. 5. The GUI in FIG. 5 is labeled "Select Vendor.INF File" 501 which would be the GUI which is displayed if the user clicked on the browse button 426 in FIG. 4 opposite to the "Vendor.INF Filename" box (406 in FIG. 4). Similar GUIs would be displayed for the other browse buttons (428, 430 or 432 in FIG. 4) and the title bar 501 would display the appropriate title. Using this GUI the user can select a disk drive 511 containing the device driver files and directories, a directory 513 to indicate a specific set of files 505 contained in the directory, and can then select the specific INF filename from among those displayed in box 505. The one selected would be displayed in the "file Name" box 503 and if that is the one desired by the user he would click on the "OK" button 507 and the file name selected will be transferred to the appropriate box in the GUI shown in FIG. 4 If the user is not satisfied with the file name selected he can click on the "cancel" button 509 and begin the browse operation again. PROCESS Adding a driver in Windows OS Setup depends greatly on whether it is being added to the Windows* 95/98 or Windows NT. As indicated above, the inputs for adding a driver are the INF file, answer file, OS source path and the output is a modified answer file, modified OS installation files. In the preferred embodiment the process is depicted in FIG. 6. Referring now to FIG. 6 when the file names and path names have been inputted into the add-device GUI and the "OK" button is clicked (434 in FIG. 4) the add-device tool begins the process of adding the driver data to the Windows Setup files 601. The designated Driver INF file is read 603 and a determination is made as to whether the driver is for windows 95/98 or NT 605. If it is for neither 609, an error message is displayed 613 and the process exits 614. In the preferred embodiment, determining whether it is a Windows 95 INF file requires a check for "Signature" key under "Version" section. (Note that the format for an INF file is shown in Appendix C of the Windows 95 Resource Kit document which is incorporated fully herein by reference). The value should be one of the following values; "$CHICAGO$", "$Windows95$" "$Windows 95$" For Example: [version] LayoutFile=layout.inf signature="$CHICAGO$" Class=Net provider=%V_MS % If the "signature" value matches one of the above then it is determined to be a Windows 95/98 type INF file 607 and the process proceeds to copy the files from the directory where the INF file is given to the directory where the OS source files exist 615. This file copying process proceeds as follows: For all the CopyFiles sections of the INF file, get their values. These values are either sections under which the actual files are specified or the actual files themselves. These values are separated by `,` and hence broken to individual strings before finding out whether they are actual files or sections indicating where to look for the actual files. If the first character of the value is preceded by `@` then this is the actual file otherwise it is the section under which actual files are specified. Read the file sections for actual file names. These sections are formatted as <destination-filename> [,[<source-directory>.backslash.]<source-filename> ] [,temporary-filename] [,flag]. NOTE: The <source-filename> is the same as the <destination-filename> if the <source-filename> parameter is NOT present. The source is the source directory from which the INF file is read. We read files and directories from the INF location and copy them to the OS installation file location. For example: ; Install NDIS3 [E100B.ndis3] CopyFiles=E100B.ndis3.CopyFiles [E100B.ndis3.CopyFiles] e100b.sys, nt.backslash.e100b.sy_ ; nt is the subdirectory ; Install NDIS2 [E100B.ndis2] CopyFiles=E100B.ndis2.CopyFiles [E100B.ndis2.CopyFiles] e100b.dos, ndis.backslash.e100b.dos The values for the CopyFiles" keys are "E100B.ndis3.CopyFiles" and "E100B.ndis2.CopyFiles". Since these values are not preceded by `@` they are names of the file sections. Reading the sections "E100B. ndis3.CopyFiles " and "E100B.ndis2.CopyFiles" and we get "e100b.sys, nt.backslash.e100b. sy_" and "e100b.dos, ndis/e100b.dos". From these values we determine that the files are e100b.sy_and e100b.dos and their relative directories are nt and ndis respectively. We copy the files from A:.backslash.E100B.backslash.NT.backslash.E100B.SY_and A:.backslash.E100B.backslash.NDIS.backslash.e100b.dos to .backslash..backslash.LCM.sub.-- 1234.backslash.OS.backslash.WIN95.backslash.NT.backslash.E100B.SY_and .backslash..backslash.LCM.sub.-- 1234.backslash.OS.backslash.WIN95.backslash.NDIS.backslash.E100B.DOS (where A:.backslash.E100B is INF directory and .backslash..backslash.LCM.sub.-- 1234.backslash.OS.backslash.WIN95 is the OS source). Finally the INF file is copied to OS source directory. Next the Answer file is updated 617. This is done as follows: We update the answer file with INF information so that Windows* 95/98 Setup will copy the needed driver files. We update the following entries in the answer file: [Install] This section sets parameters for copying additional files as part of Windows* 95 installation. We append the "Inf Copy" value to the "CopyFiles" key under the "Install" section (the "Inf.Copy" section is the section under which files to be copied are listed). [Install] CopyFiles=Inf.Copy [Inf.Copy] Write the actual INF file name as a key under this section so that Windows* 95 Setup picks up this file and copies it to the OS source directory. [Inf.Copy] nete100b.inf= where nete100b.inf is the INF file name. [DestinationDirs] This section defines the destination directories for the above [Inf.Copy] sections [DestinationDirs] Inf Copy=17 Here 17 is the INF directory. For the values refer to "Microsoft Windows 95 Resource Kit" from Microsoft Press. Finally the CUSTOM.INF file is updated 619. This is done as follows: We update the CUSTOM.INF file in the OS source directory in case the answer file uses custom setup instead of the typical installation. (In the answer file the custom setup can be chosen by specifying the value "3" for "Install Type" under the "Setup" section) We write the following sections in the "CUSTOM.INF" file. [Version] Signature=$CHICAGO$; For Windows 95 [Custom_Precopy] CopyFiles=PrecopyFiles [PrecopyFiles] e100b.sy_= e100b.dos= e100bodi.com= nete100b.inf= Note: the above values are for example only. The actualfiles depends upon the actual driver. Copy file sections described as in CopyFiles item. [DestinationDirs] PrecopyFiles=2 2 is temporary setup directory. [SourceDisksNames] 1=Disk.sub.-- 1_Desc,, 0 Identifies and names the disks used for installation of the given device drivers. Here 1 identifies one source disk and assigns it ordinal 1 and "Disk.sub.-- 1_Desc" as a description [SourceDisksFiles] filename=disk-number Names the source files used during installation and identifies the source disks that contain the files. The ordinal of the source disk defined in the disk-number must be defined in the [SourceDiskNames] section. [SourceDisksFiles] e100b.sy.sub.-- =1,nt,11 e100b.dos=1,ndis,11 e100bodi.com=1,dos,11 nete100b.inf=1,,11 At this point the process for the Windows 95/98 driver add is completed and the process exits 614. Referring again to FIG. 6 if the driver in the INF file is not for Windows 95/98 but rather for Windows NT 611 the driver type is determined. 621. If it is for Windows NT the value should be one of the following values; "$WINDOWSNT$", "$WindowsNT$" "$Windows NT$" For Example: [version] LayoutFile=layout.inf signature="$WINDOWSNT$" Class=Net provider=%V_MS % If the "signature" value matches one of the above then it is determined to be a Windows nt type INF file and the Add-Device tool tries to determine which of the following type the driver is. Display. Network. SCSI. Mouse. If the INF file is Windows NT 4.0 format the type is determined by reading the "Class" key in [Version] section of the INF file, if the INF file is Windows NT 3.51 format the type is taken from "OptionType" key in [Identification] section. The INF file is read and information about the driver is extracted as follows: if the type is "Display"--we get Adapter model. if the type is "Network"--We get Adapter model. if the type is "SCSI"--We get the SCSI model and driver files; and if the type is "Mouse"--We get the mouse model and driver files. The process then displays all available adapter models supported by this driver. The user picks up a driver model from the displayed list. Then a list of driver files is created for this particular model. 623. Next the tool modifies the answer file and txtsetup.oem files. 625 as follows: If it is a Display--Modify only the answer file. AddDevice writes the following information in the [Display] section. [Display] InfFile="FileName.inf" InfOption="Driver String" InstallDriver=1 BitsPerPel=16 XResolution=640 YResolution=480 VRefresh=60 AutoConfirm=1 If it is a Network type--We modify only the answer file. The Add-Device tool writes the following information in the [Network] section. E100BPCI=NetCardSection, .backslash.$OEM$.backslash.ADAPTERKEY NetCardSection is the section with Network Interface Card (NIC) configuration parameters. If it is empty, Windows setup will detect them. .backslash.$OEM$.backslash.ADAPTERKEY is the directory with driver files. It is relative to the source path directory. ADAPTERKEY is determined when the user selects the adapter model from the list of supported adapters. If it is a SCSI type--We modify answer file and txtsetup.oem files. The Add-device tool writes the following information in the [MassStorageDrivers] section. "Driver String"="OEM" It writes also all the necessary driver files in [OemBootFiles] section. The Add-Device tool also modifies the Txtsetup.oem file in .backslash.$OEM$.backslash.TEXTMODE directory, supplying list of the driver files. If it is a Mouse Type--We modify the answer file and txtsetup.oem files. The Add-Device tool writes the following information in the [PointingDeviceDriver] section. "Driver String"="OEM". It also modifies the Txtsetup.oem file in .backslash.$OEM$.backslash.TEXTMODE directory supplying list of the driver files. Finally, the add-device tool copies the driver files to OS installation files location 627 as follows: Step 1--Copying the files from the source (the directory where the INF file is) to directory where the OS files are. A special directory $OEM$ must be created under OS installation files directory. For SCSI and Mouse drivers the files must be copied into $OEM$.backslash.TEXTMODE directory. The process of determining which files are to be copied is described below. Windows NT requires all OEM files that will be installed during Text mode setup to be in the TEXTMODE directory under $OEM$. For display drivers all of the files are copied into $OEM$.backslash.Display directory. For network drivers all, the files are copied into a subdirectory of $OEM$ that has the name of the driver key. The driver key is the name of the key in [Options] section of the INF file. For example if the name of the driver key in the INF file is E100BPCI, all the files will be copied into $OEM$.backslash.E100BPCI directory. Step 2.--For all the CopyFiles sections of the INF file, get their values. These values are either sections under which the actual files are specified or the actual files themselves. These values are separated by `,` and hence broken to individual strings before finding out whether they are actual files or sections to look in for the actual files. If the first character of the value is preceded by `@` then this is the actual file otherwise it is the section under which actual files are specified. Read the file sections for actual file names. These sections are formatted as <destination-filename> [,[<source-directory>.backslash.]<source-filename>] [,temporary-filename] [,flag]. NOTE: The <source-filename> is the same as the <destination-filename> if the <source-filename> parameter is NOT present. The source is the source directory from which the INF file is read. We read files and directories from the INF location and copy them to the OS source files location. For example: ; Install NDIS3 [E100B.ndis3] CopyFiles=E100B.ndis3.CopyFiles [E100B.ndis3.CopyFiles] e100b.sys, nt.backslash.e100b.sy_ ; nt is the subdirectory ; Install NDIS2 [E100B.ndis2] CopyFiles=E100B.ndis2.CopyFiles [E100B.ndis2.CopyFiles] e100b.dos, ndis.backslash.e100b.dos At this point the files necessary for NT to install the new driver have been modified and the add-device tool exits 614. It is noted that one cannot remove the driver information from answer file once it is inserted therein. Once the file is modified, if a user chooses to remove the driver information from the answer file, a new answer file must be selected from the service wizard OS page or the data must be removed manually from the existing file. Having described the invention in terms of a preferred embodiment, it will be recognized by those skilled in the art that various types of general purpose computer hardware may be substituted for the configuration described above to achieve an equivalent result. It will be apparent to those skilled in the art that modifications and variations of the preferred embodiment are possible, which fall within the true spirit and scope of the invention as measured by the following claims.
|
Same subclass Same class Consider this |
||||||||||
