How to extract the Details tab information for File Properties

I have the script I placed in the code box in my previous post stored in an .h file and read it into the program. The only difference is that $folder = "C:\Windows\System32\Drivers" is replaced with $folder = inString where inString is given by the app.

The strangest thing: The app is crashing due to an incomplete directory listing given by the dir command. :confused2:
 
Last edited:
I have the script I placed in the code box in my previous post stored in an .h file and read it into the program. The only difference is that $folder = "C:\Windows\System32\Drivers" is replaced with $folder = inString where inString is given by the app.

The strangest thing: The app is crashing due to an incomplete directory listing given by the dir command. :confused2:

Parse it out, what is it sending for the directory path?
 
Found the problem, but I don't know how to fix it. Apparently I am being redirected to the SysWoW64 directory. I had no idea Windows 64-bit did that...

EDIT: Simple solution. I just had to call the following function prior to asking for the directory listing:
Code:
Wow64DisableWow64FsRedirection(NULL);
 
Last edited:
Alright, I think it is finally ready. It has not been tested on Windows 8, so let me know if there are any problems.
 

Attachments

Last edited:
Thanks Mike! We lost power at 5pm EDT yesterday and don't know when it'll be back on (it's about 5 am now). I'll reply back as soon as I am able. I am sending this from my phone.
 
Thanks!

If you wouldn't mind, an output with date modified instead of date created may be more helpful to John. The date modified date usually matches the timestamp of the driver creation whereas the date created date tends to match when the driver was installed on the system.
 
Well... I had to do it twice... Second time around I had to exclude D:\ and G:\ from the search, otherwise there would be 5 or 6 Windows 7 system folders being scanned from previous backups of other's systems...
 

Attachments

Looks great! Thanks for re-running it.

I'm sure John can get some useful info from that if it is sorted by the file version or Owner to find Windows 8 version drivers or TrustedInstaller owned drivers.

I wonder if I should have kept the file paths saved within the info, as well... I'll wait to see what John thinks when he gets power back.
 
Probably a good idea, especially when it comes to people like me who may have 10 sets of "Windows" folders from 10 different installations... I hate to see the size of that file after it ran my entire system.
 
Had a bit of a problem. I have 8 different driver files in one directory - yet I know that there's only 1 driver of that name in that directory.
Ran it on a Win7 32 bit system at work
Attached .csv file - just remove .txt to open in Excel (file is sorted by File Path)
I saved it so you could see this with 1394ohci.sys - but it happens with others
 

Attachments

Last edited:
I am thinking it is likely that it appears in more places, but the program is only checking the first place they match. I'll see about fixing it so that does not happen anymore. Should take only a few minutes. I'll have to test it prior to uploading it, though. I'll be back with a new version later today.
 
Last edited:
In my "SystemFiles" directory (C:\Users\Public\Documents\SystemFiles\), that file should appear a good number of times - but only once in that particular path (C:\Users\Public\Documents\SystemFiles\Release Preview Win8-RP_SP0_x64\)
And, in that path, the only 1394ohci.sys file is version 6.2.8400.0 size of 221 kb and date modfied of 5/18/2012 11:34PM
 
Here's the dir output of the SystemFiles directory
Each of the sub-dirs contains a drivers folder with all the drivers from that version of the OS:
Volume in drive C is Windows
Volume Serial Number is C085-E5D2

Directory of C:\Users\Public\Documents\SystemFiles

10/27/2012 08:31 AM <DIR> .
10/27/2012 08:31 AM <DIR> ..
01/07/2011 08:39 AM 31,828 atapi.reg
10/27/2012 08:30 AM 1,439 details.ps1
01/06/2011 09:44 AM 72,022 Drivers List MFR - XPPro-SP2.htm
01/06/2011 10:36 AM 74,952 Drivers List MFR Vista SP2 x86.htm
01/06/2011 10:37 AM 106,780 Drivers List MFR Win7 x64.htm
01/06/2011 10:29 AM 74,952 Drivers List Vista SP2 x86.htm
01/06/2011 10:36 AM 106,780 Drivers List Win7 x64.htm
01/06/2011 09:38 AM 72,022 Drivers List XPPro-SP2.htm
10/29/2010 11:22 AM 257 FILES.txt
06/18/2012 09:40 AM <DIR> Release Preview Win8-RP_SP0_x64
06/18/2012 09:40 AM <DIR> Release Preview Win8-RP_SP0_x86
03/24/2012 01:56 PM <DIR> Vista_SP0_x64
03/24/2012 01:56 PM <DIR> Vista_SP0_x86
03/24/2012 01:57 PM <DIR> Vista_SP1_x64
03/24/2012 01:57 PM <DIR> Vista_SP1_x86
03/24/2012 01:57 PM <DIR> Vista_SP2_x64
03/24/2012 01:57 PM <DIR> Vista_SP2_x86
03/24/2012 01:57 PM <DIR> Win7_SP0_x64
03/24/2012 01:58 PM <DIR> Win7_SP0_x86
08/25/2012 12:41 PM <DIR> Win7_SP1_x64
08/25/2012 12:41 PM <DIR> Win7_SP1_x86
10/13/2012 09:15 AM <DIR> Win8-RTM_SP0_x64
10/13/2012 09:15 AM <DIR> Win8-RTM_SP0_x86
03/24/2012 01:58 PM <DIR> XP_SP0_x86
03/24/2012 01:59 PM <DIR> XP_SP1_x86
03/24/2012 01:59 PM <DIR> XP_SP2_x86
03/24/2012 01:59 PM <DIR> XP_SP3_x86
9 File(s) 541,032 bytes
20 Dir(s) 83,004,801,024 bytes free
 
Last edited:
See if this version works a little better. You may still get some duplicates if similar file names exist, i.e. an application file with the same name as a driver file, but the paths should at least be accurate.
 

Attachments

This is the work computer. I use the Public directory so the rest of the techs have an easy place to go to find replacement drivers
In the directory above the "drivers" directory is also a bunch of .exe and .dll files that are critical to loading Windows.

I'll give the new version a try at work today! Thanks!
 

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

Back
Top