End Sub\r
\r
\r
-'Waiting to delete a file until it's free\r
-\r
-Function FileDeleteUntilFree(filename)\r
- Set objFSO=CreateObject("Scripting.FileSystemObject") \r
- Set WshShell = CreateObject("WScript.Shell")\r
- dim too_much \r
- too_much = 0\r
- Do While objFSO.FileExists(filename)\r
- On Error Resume Next \r
- objFSO.DeleteFile(filename)\r
- WScript.Sleep 100 ' milliseconds\r
- ' Do not wait to long to delete the file, bail and don't delete it if too\r
- ' long of a wait.\r
- too_much = too_much + 1\r
- if too_much > 50 then\r
- msgbox "delete Timeout(5) " & filename\r
- exit Do\r
- End If\r
- err.clear \r
- Loop \r
-End Function\r
-\r
Sub FileDelete(filename)\r
Dim fso\r
Set fso = CreateObject("Scripting.FileSystemObject")\r
' complib.dll never gets installed.\r
' If features[IPoIB+(WinSockDirect OR NetworkDirect)] are installed, then\r
' wait for IPoIB device to appear in order to ensure WSD and/or ND provider\r
-' instal success.\r
+' install success.\r
\r
Sub CheckDriversOK()\r
Dim winDir, WshShell, fso, AddLocal, too_long\r
End If\r
\r
' wait for IPoIB driver to start so ND and/or WSD can install\r
+ ' Define start as the appearance of IBA\IPOIB instance in device database.\r
\r
devList = Find_Dev_by_Tag(WshShell,devman,"find","IBA\IPOIB")\r
- too_long = 0\r
+\r
+ too_long = 15\r
+ If Session.Property("VersionNT") = WindowsXP Then\r
+ ' XP does not support timeout cmd; let timeout cmd fail to consume time.\r
+ too_long = 50\r
+ End If\r
\r
Do While IsNull(devList)\r
- WScript.Sleep 1000 ' milliseconds\r
' Wait for device IPoIB to appear as it's required for WSD/ND install.\r
- too_long = too_long\r
- if too_long > 30 then\r
+ WshShell.Run "cmd.exe /c timeout /T 2", 0, true\r
+ too_long = too_long - 1\r
+ if too_long <= 0 then\r
+\r
+ ' timeout info box.\r
+ WshShell.Popup "WARNING: Possible NetworkDirect startup Failure." _\r
+ & vbCrLf & " Waited too long for IBA\IPOIB device?" & vbCrLf & _\r
+ "use 'ndinstall -l' to verify NetworkDirect provider " & _\r
+ "installed correctly.",15,"WinOF-Install CheckDriversOK", _\r
+ vbInformation+vbSystemModal\r
+\r
+ MsiLogInfo "[WinOF] ** Possible NetworkDirect startup Failure" & _\r
+ vbCrLf & "[WinOF] ** Waited too long for IBA\IPOIB device?" & _\r
+ vbCrLf & "[WinOF] ** Check ND provider status."\r
exit Do\r
End If\r
err.clear \r