downloads
 drivers & firmware


PDA

View Full Version : Windows remembers old USB driver installation


   
 
 
greenstuff
03-01-2006, 12:28 PM
I have designed a USB device and written the device driver (for the purpose of this post the device driver is called 'original.sys' and the inf file, 'original.inf') which works fine. However, due to events beyond my control, the name of the device driver needs to be changed (for the purpose of this post to 'new.sys' and 'new.inf'). The new.inf file has been ammended to take into account the name change.

I have uninstalled the original.sys device driver, deleted the actual original.sys, original.inf and original.pnf files within the Windows directories. I have also removed all entries in the registry relating to the device driver (such as VID, PID, GUID, services etc).

On starting up the device, the Found New Hardware wizard starts up as expected. I select the 'Install from a list or specific location' option and manually select the 'new.inf' file. Once this file is selected, there is a list of compatible hardware displayed in the window (5 entries) - each entry in this list is the same and is the descriptor of the device as specified in the original.inf and new.inf files. Windows is obviously 'remembering' old installations. On selecting 'Next' to install the device driver, a window appears asking for the original.sys driver to be located and there is no way to select the new.sys driver.

My PC is running Windows XP Pro Service Pack 2 and all recent updates installed.

The installation works fine on a clean machine which hasn't had the original.sys driver installed previously.

Does anyone have any ideas on how to stop Windows 'remembering' the old driver installation (without having to reinstall Windows XP)?

Thanks in advance

Martin

Unregistered
03-01-2006, 10:29 PM
When the driver is installed Windows makes a copy of the original INF file, changes its name to this format OEMXXX.INF (X being some number) and copies it to a hidden INF directory.

Here is how one company recommends finding and deleting their drivers INF files.

http://www.kvaser.com/support/technote/can33_man_del_oem.htm

greenstuff
03-02-2006, 08:48 AM
Thanks for the response. I've managed to trackdown the root of my problem

I forgot to mention in my previous post that I had removed the relevant oemXX.inf and oemXX.pnf files from the %windir%\inf directory and the problem was still occurring.

Anyway as I mentioned above I've managed to solve the problem by having a look in setupapi.log (it was pretty stupid of me really!). In the directory that contained my new.sys driver and inf files, I had still got the original.sys and inf file which I had renamed to original.sys_dsg and original.inf_dsg (in the belief that they would be ignored by the installation process). However, the installation process was picking up original.inf_dsg first which obviously contains references to original.sys, which it was attempting to install. On deleting original.inf_dsg, the problem went away. I thought the installation process specifically looked for .inf files but this is obviously not the case.


Thanks for your help

Martin

taz_zilla
03-09-2006, 01:57 AM
I am knee deep in a similar problem.

But to address this: It appears that for renaming systems files to work, you need to modify one of the 3 characters after the decimal (i.e. .inf > .in0) for the OS to ignore it. I only realized this through trial and error. Changing the 4th character and beyond appear to have no effect (go figure) :mornin:

I am currently trying to see how I can get the Windows Installer in .NET 2003 to self register inf files. I see that SetupCopyOEMInf is the function the DDK want to be used, but I do not know how to get the Installer to do that.

Enjoy,
Mark

TorturedSouls
03-09-2006, 04:44 AM
XP saves an image of the driver in C:\WINDOWS\Driver Cache\i386\driver.cab
you have to find the driver in question there and also below. the one in the top half will be named something like this 3155pcl.gpd the associated file will be associated to the driver listed bellow in the same file, you may also have to edit one of the cnb# files as well. the best way to so this is to write your own OEM.INF file to custom load the variables $ to the drivers so they will install in all of the appropriate places

techmick
10-07-2007, 08:42 PM
The Windows DDK has a utility called "GENINF". It'll create an 'inf' file for you - all you have to do is fill in the blanks (and go over the D****d thing with a fine tooth comb!). Windows installer will take care of copying the necessary files to the relevant places as per your newly generated 'inf' file instructions. Hope this helps.