How to extract the Details tab information for File Properties

And this driverquery that writhziden posted please:
Code:
driverquery /v /fo csv>"%userprofile%\Documents\driverlist.csv"
 
Last edited:
I tried these at work, and they don't really have what I want/need.

Restated goal:
- a program that will list all file attributes and all extended file attributes in a csv file for a given directory and it's sub-directories.

There's lot's of similar work that's been done on the web - but it's way over my head (I do have difficulty with programming)

TIA!
 
A powershell script from Ed Wilson of Microsoft that I edited for your purposes. If you are familiar with Powershell, it will work until an application can be made.

Some helpful tutorials I found on Powershell:




Code:
# =============================================================================
# 
# NAME:DisplayMetaData.ps1
# 
# AUTHOR: Ed Wilson , microsoft
# DATE  : 8/10/2008
# 
# COMMENT: 
# Uses Params to allow modification of script at runtime
# Uses shell.application com object to obtain meta data
# Uses funLine function to underline output
#
# =============================================================================
param($folder = "C:\Windows\System32\Drivers") #end param
Function funLine($strIN) 
{
  $strLine = "=" * $strIn.length
  Write-Host -ForegroundColor Yellow "`n$strIN"
  Write-Host -ForegroundColor Cyan $strLine
} #end funline
Function funMetaData()
{
 foreach($sFolder in $folder)
  {
   $a = 0
   $objShell = New-Object -ComObject Shell.Application
   $objFolder = $objShell.namespace($sFolder)
   foreach ($strFileName in $objFolder.items())
    { FunLine( "$($strFileName.name)")
      for ($a ; $a  -le 266; $a++)
       { 
         if($objFolder.getDetailsOf($strFileName, $a))
           {
             $hash += @{ `
                   $($objFolder.getDetailsOf($objFolder.items, $a))  =`
                   $($objFolder.getDetailsOf($strFileName, $a)) 
                   } #end hash
            $hash
            $hash.clear()
           } #end if
       } #end for 
     $a=0
    } #end foreach
  } #end foreach
} #end funMetadata 
# *** Entry Point ***
funMetaData
 
Last edited:
It works - sort of.
I copied the script to the directory that I want to run it from
Then execute .\details.ps1 >output.txt

It has all the info (in this format:)
Name Value
---- -----
Name 1394bus.sys
Size 53.5 KB
Item type System file
Date modified 7/13/2009 7:51 PM
Date created 7/13/2009 7:51 PM
Date accessed 7/13/2009 7:51 PM
Attributes A
Perceived type System
Owner Administrators
Rating Unrated
Copyright © Microsoft Corporation. All rights reserved.
Company Microsoft Corporation
File description 1394 Bus Device Driver
Computer BBY00549W074 (this computer)
Filename 1394bus.sys
File version 6.1.7600.16385
Shared No
Folder name drivers
Folder path C:\Windows\System32\drivers
Folder drivers (C:\Windows\System32)
Path C:\Windows\System32\drivers\1394bus.sys
Type System file
Language English (United States)
Link status Unresolved

Any ideas on how to convert it to a spreadsheet (so I can sort by the Copyright or Company columns?
 
Do you want it to include 3rd party drivers, or just the drivers in the Drivers directory? I could put together a fairly simple program to run the Powershell script on all .sys files, for example, and then output the info to a .csv file.
 
I tried to export to csv, xml and tried converting to html... None of them outputted correctly...
 
Maybe the WER XML files, if any exist??

Please check C:\ProgramData\Microsoft\Windows\WER\ReportQueue

Run this from Admin CMD -
Code:
dir /a /s C:\ProgramData\Microsoft\Windows\WER\ReportQueue\*.xml

Any XML files?
Read More:
 
The drivers directory was convenient as it contains all the Windows drivers.
I'd like to gather all drivers - but I realize that the 3rd party drivers are likely to be an exercise in futility.

I'm looking for a couple of things here.
The most significant project is a spreadsheet listing all Windows drivers from XP to Win8 (to include SP's) (I'd like to actually go back to NT eventually)
I'm thinking of a huge table with all driver names, then separate OS spreadsheets with all the details for all Windows drivers.
All the driver names (in the main spreadsheet) will have hyperlinks to the file details on the OS spreadsheets
Finally, I'd like a "history" for individual drivers - that'll list versions and the OS/SP that they apply to

I currently have a collection of the drivers folders from all OS's from XP SP0 to Win8 RTM
 
I could put together a fairly simple program to run the Powershell script on all .sys files, for example, and then output the info to a .csv file.
I think that this would be ideal! Thanks!
 
Hint: You should be able to use the GetFileVersionInfo, GetFileVersionInfoSize, VerQueryValue, and VerLanguageName WinAPI functions to achieve this quite easily btw... :thumbsup2:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms647003(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms647005(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms647464(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/ms647463(v=vs.85).aspx

I seen you guys trying everything from PowerShell scripts and other batch scripts though so I stayed out of this. Wasn't sure if you guys were going to go with a full program for it.
 
Last edited:
I didn't know any of that, so I just put the powershell program into a c++ program with an easier interface for inputting the path and getting the details desired out.
 
But now we have to assume that Powershell is installed, which is okay, so long as the person has Windows 7 or Windows 8, or they installed it manually prior to running this program. :)
 
Nevermind, the program crashes on Windows 7. I only tested it on XP to this point. I'll have to track down what causes it and upload it again later.
 
Last edited:
What script are you using for Powershell? I'm assuming you're sending this as an argument to the powershell interpretter? :confused2:
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top