locked
How to compare the file versions RRS feed

  • Question

  • Hi I have written the below script but it is not giving me corerct result.

    Please can you let me know what is wrong in this code

    ' *****************************************************************
    ' CompareFileVersion()

    ' ****************************************************************************************************


    Set objFSO = CreateObject("Scripting.FileSystemObject")

    strFileName1= objFSO.GetFileVersion("C:\Windows\SysWOW64\mscomctl.ocx")
    strFileName2=objFSO.GetFileVersion("C:\Windows\SysWOW64\msfeeds.dll")

    msgbox strFileName1
    msgbox strFileName2

    if (strFileName1 > strFileName2) then

    msgbox strFileName1
    'do something

    else

    End if
        


    Umeed4u

    Friday, February 24, 2017 4:19 PM

Answers