/build/static/layout/Breadcrumb_cap_w.png

Need a script to find version of a dll

Hello,

 I have a script I just need it to produce the output so I can create a report or place in custom fields

Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject")
PrintDLLVersions oFSO.GetFolder(WScript.Arguments.Item(0))

Sub PrintDLLVersions(Folder)
  Dim oFile, oSubFolder

  ' Scan the DLLs in the Folder
  For Each oFile In Folder.Files
    If UCase(oFSO.GetExtensionName(oFile)) = "DLL" Then
      WScript.Echo oFile.Path & vbTab & oFSO.GetFileVersion(oFile)
    End If
  Next

  ' Scan the Folder's subfolders
  For Each oSubFolder In Folder.SubFolders
    PrintDLLVersions oSubFolder
  Next
End Sub

Usage:

> cscript //nologo script-file.vbs folder > out-file

e.g.:

> cscript //nologo dll-list.vbs C:\Dir > dll-list.txt


Or should I say I need a script to find:

wuaueng.dll version or KB# file and report it.


0 Comments   [ + ] Show comments

Answers (3)

Posted by: chucksteel 8 years ago
Red Belt
0
Do you really need the version of all DLLs in a folder or just one specific DLL? If it is one specific DLL then you can use a custom inventory rule and the FileInfoReturn(path, attribute, type) rule. Attribute would be FileVersion.
 
Posted by: SMal.tmcc 8 years ago
Red Belt
0
you can run this as shell command text return if you are looking for all occurrences of a file in directory or subdirs or redirect it to a text file.

wmic datafile where "name like 'c:\\windows\\system32\\wuaueng.dll'" get name, version

if you need only one specific dll use chucks answer


 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ