.Dll version check and file install

I have been trying to write a script that will check the version of a particular .dll file and then if the version is not high enough it installs a driver.
The script seems to not check the version properly. Please advise

'On Error Resume Next
Set FS=WScript.CreateObject("Scripting.FileSystemObject")
Set Shell=WScript.CreateObject("WScript.Shell")
DLLFile= "igfxdo.dll"

If FS.FolderExists ("C:\WINNT\System32") Then
  WinDir="C:\WINNT"
Else
  WinDir="C:\WINDOWS"
End If
If FS.FileExists(WinDir&"\System32\”"&DLLFile) Then
  DriverVer = FS.GetFileVersion(WinDir&" \System32\"&DLLFile)
  DriverVerArray=Split(DriverVer,".")
   InstallIt=FALSE
  If UBound(DrVerArray)>=0 And CInt(DrVerArray(0))<6 Then
    InstallIt=TRUE
  Else If UBound(DrVerArray)>=1 And CInt(DrVerArray(1))<14 Then
    InstallIt=TRUE
  Else If UBound(DrVerArray)>=2 And CInt(DrVerArray(2))<10 Then
    InstallIt=TRUE
  Else If UBound(DrVerArray)>=3 And CInt(DrVerArray(3))<5502 Then
    InstallIt=TRUE
 Wscript.Echo "j"
  End If
  If InstallIt Then
    Shell.Run "c:\intel_driver\xp142550.exe",10,TRUE
  End If
  End If
  End If
  End If
  End If
Wscript.Echo "still broke"

Thanks for your help
LVL 1
OccamAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pschakravarthiCommented:
Check this

Set FS=WScript.CreateObject("Scripting.FileSystemObject")
Set Shell=WScript.CreateObject("WScript.Shell")
DLLFile= "igfxdo.dll"
If FS.FolderExists ("C:\WINNT\System32") Then
      WinDir="C:\WINNT"
Else
      WinDir="C:\WINDOWS"
End If
If FS.FileExists(WinDir&"\System32\"&DLLFile) Then
      DriverVer = FS.GetFileVersion(WinDir& "\System32\" &DLLFile)
      DrVerArray=Split(DriverVer,".")
      InstallIt=FALSE
      If UBound(DrVerArray)>=0 And CInt(DrVerArray(0))<6 Then
            InstallIt=TRUE
      Else
            If UBound(DrVerArray)>=1 And CInt(DrVerArray(1))<14 Then
                  InstallIt=TRUE
            Else
                  If UBound(DrVerArray)>=2 And CInt(DrVerArray(2))<10 Then
                        InstallIt=TRUE
                  Else
                        If UBound(DrVerArray)>=3 And CInt(DrVerArray(3))<5502 Then
                              InstallIt=TRUE
                        End If
                  End If
            End If
      End If
      If InstallIt Then
            Wscript.Echo "Installing"
            'Shell.Run "c:\intel_driver\xp142550.exe",10,TRUE
      End If
End If
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OccamAuthor Commented:
Thank you!  That fixed the issue with the script.
0
OccamAuthor Commented:
Do not close this thread. THe solution was valid. Please keep it in the stack
0
Guy Hengel [angelIII / a3]Billing EngineerCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.