]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[WINOF] Fix isolated installer crash. In CheckDriversOK() remove usage of Wsh.Sleep...
authorStan Smith <stan.smith@intel.com>
Thu, 8 Apr 2010 20:35:13 +0000 (20:35 +0000)
committerStan Smith <stan.smith@intel.com>
Thu, 8 Apr 2010 20:35:13 +0000 (20:35 +0000)
Waiting for the IPoIB device ensures NetworkDirect/IBAL & Winsock Direct providers install correctly. Wait 30 seconds max, output timed nastyGram about possible IPoIB driver initialization failure (no errors returned).

git-svn-id: svn://openib.tc.cornell.edu/gen1@2770 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/WOF2-2/WinOF/WIX/CustomActions.vbs

index af74bc0ffa40084a3bac2f52c48105705b49d5e2..69f298a82a975d3fce77695addbc2106a58a577a 100644 (file)
@@ -168,28 +168,6 @@ Sub WinOF_setup
 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
@@ -1539,7 +1517,7 @@ End Sub
 ' 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
@@ -1582,15 +1560,32 @@ Sub CheckDriversOK()
        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