Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script to get file version and write file

Status
Not open for further replies.

STEWARTH

MIS
Mar 26, 1999
75
GB
Please bear with me. I'm not a VB Scripter.

How would I go about querying a file version (range) and writing a file based on the results? To be exact What I need to do is check if NTOSKRNL.EXE version is in the range 5.0.2195.4797 - 5.0.2195.4928 and if it is write a flag file somewhere on the C: drive.

I've got as far as displaying the file ver to a message box but that's about it.

Set objFSO = CreateObject("Scripting.FileSystemObject")
Wscript.Echo objFSO.GetFileVersion("c:\windows\system32\ntdll.dsll")


Thanks in advance.
 
DLLver = objFSO.GetFileVersion("c:\windows\system32\ntdll.dsll")

If DLLVer >= "5.0.2195.4797" AND DLLVer >= "5.0.2195.4928" Then
INSERT CODE TO WRITE TO FILE HERE
End if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top