Jump to content
Sign in to follow this  
Digisoul

Enum Drivers

Recommended Posts

Digisoul

Hello there,

i want to know that its possible to Enum all the running Drivers and their paths in Windows XP ?

i tried to find but didn't found any topic.

thanks in advance for your kind help.


73 108 111 118 101 65 117 116 111 105 116

Share this post


Link to post
Share on other sites
Yashied

Share this post


Link to post
Share on other sites
Authenticity

Dim $oWMI = ObjGet('winmgmts://./root/cimv2')
Dim $oSystemDrivers = $oWMI.InstancesOf('Win32_SystemDriver') ;ExecQuery('Select Win32_SystemDriver')

For $oDriver In $oSystemDrivers
    ConsoleWrite($oDriver.Caption & @TAB & $oDriver.State & @TAB & $oDriver.Status & @LF)
Next

$oSystemDriver = 0
$oWMI = 0

Share this post


Link to post
Share on other sites
Digisoul

Dim $oWMI = ObjGet('winmgmts://./root/cimv2')
Dim $oSystemDrivers = $oWMI.InstancesOf('Win32_SystemDriver') ;ExecQuery('Select Win32_SystemDriver')

For $oDriver In $oSystemDrivers
    ConsoleWrite($oDriver.Caption & @TAB & $oDriver.State & @TAB & $oDriver.Status & @LF)
Next

$oSystemDriver = 0
$oWMI = 0
Is it allways work ?

i mean i read, that some time WMI not work properly. i want to use this script in a professional project.

and 1 thing more how can i get the paths for all drivers ?

Edited by Digisoul

73 108 111 118 101 65 117 116 111 105 116

Share this post


Link to post
Share on other sites
Digisoul

DriveGetDrive()?

Not Physical Drives, i mean Drivers

e.g :

VGA , SOUND CARD and other drivers.


73 108 111 118 101 65 117 116 111 105 116

Share this post


Link to post
Share on other sites
Yashied

Share this post


Link to post
Share on other sites
weaponx

My device management udf doesn't currently have driver options but I can try adding them.

Share this post


Link to post
Share on other sites
Authenticity

Is it allways work ?

i mean i read, that some time WMI not work properly. i want to use this script in a professional project.

and 1 thing more how can i get the paths for all drivers ?

Don't know but I think that it's very likely.

If it's defined then the object's PathName property contains the path to the .sys file which is (almost always?) @SystemDir\DRIVERS.

Share this post


Link to post
Share on other sites
Digisoul

Don't know but I think that it's very likely.

If it's defined then the object's PathName property contains the path to the .sys file which is (almost always?) @SystemDir\DRIVERS.

Ya all drivers exists in @SystemDir/Drivers , but how can i know that what is the file name. I am making the application which will check the all running drivers and add them in the list . your previous script help me a bit , but now i want to catch there paths ?

73 108 111 118 101 65 117 116 111 105 116

Share this post


Link to post
Share on other sites
weaponx

You could use Nirsoft DriverView and dump all of the loaded drivers to a CSV or XML file.

Edited by weaponx

Share this post


Link to post
Share on other sites
Digisoul

You could use Nirsoft DriverView and dump all of the loaded drivers to a CSV or XML file.

Thanks for the Tip weaponx.

so isn't there any Direct example, without using other utilities?


73 108 111 118 101 65 117 116 111 105 116

Share this post


Link to post
Share on other sites
weaponx

Thanks for the Tip weaponx.

so isn't there any Direct example, without using other utilities?

Well like I said, my Device Management UDF is built upon setupapi.dll which is what Devcon uses. The task of listing loaded drivers isn't exactly cake though. I will look around and see what I can find.

Share this post


Link to post
Share on other sites
weaponx

Take a look at this post:

#521054

This uses psapi.dll which is the same thing used by Nirsoft DriverView.

Share this post


Link to post
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
Sign in to follow this  

×