In order to get device drivers which installed on your computer we will write method its name (GetDriversList), this method is it most important part of our program which it consists of sub-method its name (GetDriver), which get and store driver informaion.
So the first stage is to bring a list containing the device drivers installed on your computer, which, as we mentioned previously that it found in the Registry Editor, and then brought the information contained in the key of each driver.
To store information about each driver, you declare the structure (DriverInfo) containing 6 fields to store the name, version, date, manufacture ....... of each driver.
The method that bring in device drivers (GetDriversList), supplied with a parameter determines if we want to get all the drivers, including drivers that are installed with the system or only drivers that you installed after you install the system. In order to get that we test the value of the manufacturer (drvManufacture) If it is equal to (Microsoft), this means that the driver was already installed with the system and we do not need to do a backup copy of it.
struct DriverInfo //structure for storing driver informations
public string drvName;
public string drvVersion;
public string drvManufacture;
public string drvDate;
public string drvInfPath;
public string drvInfSection;