spartacus
Posts: 408
Score: 41 Joined: 2/4/2004 From: Warrington, United Kingdom Status: offline
|
Here's a method using the DIFx merge module - which can be found at the following location http://www.microsoft.com/whdc/driver/install/DIFxtls.mspx 1) locate the .INF file which the legacy installation uses to install the drivers. Inspect this file in notepad and work out all the files that the driver requires to be installed. This could be as little as a .SYS file, a .CAT file (assuming the driver is signed) and of course the .INF file itself. There may, however be more files (such as DLL's) that are mentioned in the .INF - the key thing here is to get a full list of the files the driver needs. As you have more than one printer driver to install, you'll need to look at all the INF files involved and make a separate list for each one. 2) In the MSI package you are developing, create separate folders, one-per-driver, named (say) PrinterType1, PrinterType2 &c. If your package deploys software other than just the driver files, these should ideally be made subfolders of the main application folder (e.g. C:\Program Files\Acme App\PrinterType1), otherwise just create the folders where most convenient to you - the important thing is to have separate folders for each driver. 3) Next create new components named (say) DriverFilesType1, DriverFilesType2 &c. Again, the important thing is to have one component per driver to be installed Move all the files that you listed from step 1) for each driver into their appropriate component and set one of the files as the keypath for the component - I usually mark the .SYS file as the keypath. The destination of each component should be the folder for that particular driver that you created at step 2) 4) Next, include the DIFx 2.0 Merge Module into your MSI package - it's named DIFxApp.msm (see link above) - you mention you are using InstallShield, so this is done via the Redistributables view and browsing to the DIFxApp.msm file. 5) Incorporating this merge module will, among other things, have introduced a new table into your package, named MsiDriverPackages, you will need to edit this table directly (e.g. use Direct Editor in InstallShield, or use ORCA). For each driver, in the Component column, you need to enter the name of the component you created in step 3) above. If the drivers are signed (i.e. you have a .CAT file) then you can set the Flags column to 0, otherwise you could use 8 for "legacy mode". The Sequence column can be left blank unless you wish to control the order the drivers are installed in, in which case you can enter ascending sequence numbers for each row. 6) That should be all that is needed for DIFx to "do it's thing". If you are working from a legacy snapshot MSI you should now go through the rest of your snapshot package removing anything else that is printer driver-related (because DIFx will now be handling this) these include. (i) any other instances of the .INF file, typically being deployed to the INF folder (ii) any other instances of the .SYS file, typically being deployed to the System32\Drivers folder. (iii) any other instances of files you listed in step 1) other than those you have put into your new components. (iv) any .PNF files that your capture picked up (v) anything in the registry under HKLM\SYSTEM\CurrentControlSet\Enum\Root or HKLM\SYSTEM\CurrentControlSet\Enum\USB Regards, Spartacus
_____________________________
La mort ne surprend point le sage Il est toujours prêt à partir.
|