Scripting Question

Need a script to find version of a dll

03/03/2016 1052 views


 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

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


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


> 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


All Answers

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.
Answered 03/04/2016 by: chucksteel
Red Belt

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

Answered 03/04/2016 by: SMal.tmcc
Red Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:


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