Simbu
Simbu

Reputation: 51

Need WMI query to get the dll information from Windows

Need WMI query to get the assmebly file details udner the path:
C:\Windows\Assembly\GAC_MSIL

I want to monitor this path once in a day and get information on:
1.Assembly Name
2.Date created
3.Date Modified
4.Full Name
5.Public Key Token

I don't want PowerShell Script to get these details. I Need a WMI query.

More information:

I used the WMI query: "SELECT * FROM CIM_DataFile " but this doesnt work . Displays Description: "Invalid Class" .
Please let me know the correct class name, namespace

Many Thanks,
Simbu

Upvotes: 0

Views: 776

Answers (1)

ravikanth
ravikanth

Reputation: 25810

The right way of using CIM_DataFile is this:

"SELECT * FROM CIM_DataFile WHERE Drive ='C:' AND Path='\\Demo\\' AND FileName='u' AND Extension='dll'"

But, I don't think this will give you PublicKey Token.

Upvotes: 0

Related Questions