Jump to content

Find NVIDIA or ATI via batch file


Recommended Posts

a little off topic but could one of these methods be used to determine a mainboard chipset and then install the necessary drivers ie distinguish between nforce2 or VIA chipsets for instance?

No need to do that...

The main reason of nVidia/ATI install methods is because ATI's CPL doesn't get installed properly, when using the common method (OemPnPdrivers)

Link to comment
Share on other sites


By the way, thanks for making us aware of devcon.exe, it's a nice toy.

I just finished making a vbscript that uses fso and wmi to remotely execute it on all enumerated PCs of a domain, and SQL insert the results in a database along with their netbios name. I already had done something similar in pure WMI, but the information is quite different... (the info is them used in a IT trouble call web app I've made, and with one click you can popup either SMS data about the computer in question, or the infos I've retrieved with WMI, and now the devcon info is next) Much appreciated!

Link to comment
Share on other sites

This cmd file could be modified to perform driver installations depending on your hardware.  I've only had a chance to test this on 2 different machines & it worked fine.  Please test this on your systems & let me know what kind of results you get. Requires DEVCON.EXE in your path.

Obtain devcon.exe here:

http://support.microsoft.com/default.aspx?...b;EN-US;Q311272

atiornv.cmd

@echo off 

:detect_vid
devcon find * | find "ATI" >NUL
if not errorlevel 1 goto ati
devcon find * | find "NVIDIA" >NUL
if not errorlevel 1 goto nvidia
goto neither

:nvidia
echo nvidia
goto end

:ati
echo ati
goto end

:neither
echo neither
goto end
:end

I just wanted to add that this is going to help me tremendously when rolling out PC's. Currently, we have batch files setup to ask you if you have X or Y hardware and jump to whatever answer you choose and run a silent install. But with the methods listed here, finding the correct hardware and installing the drivers either through finding the files or devcon will help me automate the process a whole lot more. I was aware of devcon.exe in the past because I use it for silently installing a AMD processor driver that enables Cool N' Quiet on a ASUS board, but never thought of using it as a detection utility.

Just wanted to say thanks for sharing your ideas.

Link to comment
Share on other sites

  • 3 weeks later...
This cmd file could be modified to perform driver installations depending on your hardware.  I've only had a chance to test this on 2 different machines & it worked fine.  Please test this on your systems & let me know what kind of results you get. Requires DEVCON.EXE in your path.

Obtain devcon.exe here:

http://support.microsoft.com/default.aspx?...b;EN-US;Q311272

What path does the DevCon file need to be in? How do you put it in the installation path?

Link to comment
Share on other sites

a little off topic but could one of these methods be used to determine a mainboard chipset and then install the necessary drivers ie distinguish between nforce2 or VIA chipsets for instance?

If you really wanted to, yes it could. I used it to find a partial on the SMBus HID ( PCI\VEN_10de ) from my nVidia board:

@echo off
:detect nVidia board
devcon find PCI\VEN_10de | find "NVIDIA" >NUL
if not errorlevel 1 goto nvidia
goto none

:nvidia
echo found nVidia
goto end

:none
echo Found Nuttin'
goto end

:end
pause

Tbh, I'm still learning the structure of it so I may have put more in there than I needed to make it work (not sure about the second "find "nvidia" >NUL" part, if I need it or not), but it works nevertheless.

Link to comment
Share on other sites

I don't like that method too much. It will match *any* hardware made by nvidia (including video cards)... For example, a NVIDIA Riva TNT2 has this string: Pci\Ven_10de&dev_0028 (to the best of my knowledge - not that have one around to test) and it would isntall your nforce drivers because of it... Using both Vendor ID and Device ID is the reliable way to test. I've been meaning to do a batchfile (or vbscript or program...) that would test for most chipset categories like that (via, intel, sis, nforce, ...). I just need to find some time for it. Even better than that would be not to use devcon, but rather use direct port i/o to get southbrige/northbrige Mfg/Dev ID's instead. I already have quite extensive lists of them made up. (I'm also using a Mfg/Dev ID match to install a F-Lock registry tweak only for my ms office keyboards, and I've been considering making one for usb2/firewire detection too...)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...