Share This Post

Retrieving Dynamic Link Library Version Information From A Remote Machine

Use the following Vbs script to get the file name, manufacturer and version of a .Dll (or any other file for that matter) file from a remote machine.

In the example below we are getting the Name, Version and Manufacturer for the C:\Windows\System32\Wbem\WbemCore.Dll.

Note: In the script below notice that the path noted above has not one but two forward slashes (\\) to return the absolute path for the file you are querying.

Vbs Script:

strComputer = InputBox ("Enter Machine Name")

Set objWMIService = GetObject("winmgmts:" _

& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colFiles = objWMIService.ExecQuery _

("Select * from CIM_Datafile Where name = ‘C:\\Windows\\System32\\Wbem\\WbemCore.Dll’")

For Each objFile in colFiles

Wscript.Echo "Name: " & objFile.Name

Wscript.Echo "Version: " & objFile.Version

Wscript.Echo "Manufacturer: " & objFile.Manufacturer

Next

Share This Post

Don Hite began writing as a columnist for Rod Trent on SWYNK.Com (Now Enterpriseitplanet.Com) in the winter of 1999. In January of 2002 he co-founded the Kansas City Regional Systems Management Users Group (KCRSMUG) along with Janis Keim. Don is the eldest of four children and was born in the Army hospital at Wurzburg Germany in November of 1957. After living in Bad Kissingen Germany for the first few years of his life the Hite family moved back to the United States after his father retired from the army when Don was still in kaki army diapers. Educated by trade as a commercial master electrician Don made the career change from terminating Copper Conductor cable to terminating Ethernet cable in the early 1990’s. Don is married and lives on a farm in rural Kingsville Missouri with his wife Virginia (Ginny) and has a Son Lee, Stepdaughter Lisa and an 11 year old grandson named Blake.

Leave a Reply