Occam
asked on
.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("S cripting.F ileSystemO bject")
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&"\Sys tem32\”"&D LLFile) Then
DriverVer = FS.GetFileVersion(WinDir&" \System32\"&DLLFile)
DriverVerArray=Split(Drive rVer,".")
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,TR UE
End If
End If
End If
End If
End If
Wscript.Echo "still broke"
Thanks for your help
The script seems to not check the version properly. Please advise
'On Error Resume Next
Set FS=WScript.CreateObject("S
Set Shell=WScript.CreateObject
DLLFile= "igfxdo.dll"
If FS.FolderExists ("C:\WINNT\System32") Then
WinDir="C:\WINNT"
Else
WinDir="C:\WINDOWS"
End If
If FS.FileExists(WinDir&"\Sys
DriverVer = FS.GetFileVersion(WinDir&"
DriverVerArray=Split(Drive
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.
End If
End If
End If
End If
End If
Wscript.Echo "still broke"
Thanks for your help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Do not close this thread. THe solution was valid. Please keep it in the stack
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.
ASKER