Non Present Devices Driver Mass Unistall

Posted on 2004-11-18
Last Modified: 2012-08-13
hi, i have a production procedure in wich firmware of cdrom drive is updated.
If you do


you can see disconnected devices, but drivers remain installed.
The problem is that you get to a point where no more devices can be added.
The question: somebody knows a way to increase this limit or to mass unsistall all these non present devices?

Thanks in advance

Question by:fmonroy
    LVL 7

    Expert Comment

    I don't need to try this myself, but I presume this would work...

    first vist and download devcon.exe;EN-US;Q311272

    next to list all the CDROMS...
    just so you know what is removed when you...

    You could get a little more sophisticated and spend a few minutes some more sophisticated scripting (you could find all the CDROMS and make a list then have a do a FINDALL removing those that didn't exist), but for CDROMS, I might just remove them all and let it reinstall whatever is attached when a rescan for new hardware is done.


    LVL 5

    Author Comment

    this is perfect, i'll test it on monday, and you have the points

    Thanks a lot.
    LVL 5

    Author Comment

    findall works fine, detects all the non present devices

    but the remove command only remove the devices that are currently connected

    this is and example of disconnected device as listed with finall option:

    USB\VID_1915&PID_2234\5&2A3C942C&0&5                        : Linksys Wireless-G USB Network Adapter

    i tried devcon remove USB\VID_1915&PID_2234\5&2A3C942C&0&5
    and i got
    No devices removed.
    The system cannot find the path specified.
    '2A3C942C' is not recognized as an internal or external command,
    operable program or batch file.
    '0' is not recognized as an internal or external command,
    operable program or batch file.
    '5' is not recognized as an internal or external command,
    operable program or batch file.
    then devcon remove "USB\VID_1915&PID_2234\5&2A3C942C&0&5"
    and i got
    No devices removed.

    any idea?
    LVL 7

    Accepted Solution

    FYI: & is a special DOS command to separate multiple commands on the same line.  For instance DIR & DIR is 2 dir commands on one line.  DEL FILE.TXT && DIR executes the second DIR command if there is no error executing DEL FILE.TXT.

    Yeah, so you need to use
    devcon remove "USB\VID_1915&PID_2234\5&2A3C942C&0&5"
    like you tried or you need to escape the special & characters with ^.
    devcon remove USB\VID_1915^&PID_2234\5^&2A3C942C^&0^&5
    or use a wildcard
    devcon remove USB\VID_1915*

    So then I also tried uninstalling a removed device and I couldn't accomplish anything.  I even tried to DEVCON INSTALL to first install the device so that I might remove it afterwards with no success.  So it appears DEVCON REMOVE only removes attached devices.

    I would have thought DEVCON was the answer, you need to run it systemattically each time before you disconnect a CDROM, so put it in a batfile along with shutdown.


    Your job would be much easier if you could do this via USB without the need to reboot.  Actually I would have thought that you could update most of these drives from DOS without having to boot into windows (a dos partition with a bunch of bat files).

    Anyways, back to the original question... nope no more ideas.  I'd resort to attacking the registry directly.
    I think that's drastic, but I went in there and deleted a bunch of entries.  (You need to change the permissions first, if there are a lot of entires to delete change the upper branch permission).  Do do it programmically, you need to use SubInAcl.exe from a Windows server resource kit to change the permission then REG DELETE to delete entry and repeat.  I wouldn't do it programmically, and I'd some REG exporting first to back things up.  Find one of those disclaimers you see all the time when they talk about modifing the registry -- this is the actual stuff they are warning against doing.

    LVL 5

    Author Comment

    wow, it appears to work, i'll do some code to handle this.

    Thanks a lot.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity
    Need change "file dialogue" box defaults 10 60
    Opening .xlsx files in Windows 7 21 175
    Hyper V vm 4 115
    move Windows 10 apps to diff disk 39 103
    Most of the time we are in fix when all of sudden our systems behave weirdly.  Such problems cost time and effort... so it's best to take some preventive actions so that we can avoid such issues or overcome such problems more easily. Preventive M…
    Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now