]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[OFED] More WinOF --> OFED name changes. In CheckDriversOK() remove usage of Wsh...
authorStan Smith <stan.smith@intel.com>
Thu, 8 Apr 2010 20:29:26 +0000 (20:29 +0000)
committerStan Smith <stan.smith@intel.com>
Thu, 8 Apr 2010 20:29:26 +0000 (20:29 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@2769 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/OFED/WIX/CustomActions.vbs

index 968b376fc7dbc005dda2ba716bb9389d2162906e..7821f166e8fb76f2db478a91afcb428b2bc0bcaa 100644 (file)
@@ -27,7 +27,7 @@
 ' * SOFTWARE.\r
 ' */\r
 \r
-' WIX CustomActions used in the WinOF (Windows OpenFabrics) Release.\r
+' WIX CustomActions used in the OFED for Windows Release.\r
 ' File is based on the installer src contributed by Mellanox Technologies.\r
 '\r
 ' TabStops == 4\r
@@ -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
@@ -1085,7 +1063,7 @@ Sub cleanup_driver_files(fso,WshShell,sInstalldir,tool,devInfo)
        End If\r
 \r
        If sDBG >= "1" Then\r
-               DisplayDevInfo devInfo,"WinOF Remove Driver Package"\r
+               DisplayDevInfo devInfo,"OFED Remove Driver Package"\r
                udfCnt = 0\r
                Flist = ""\r
        End If\r
@@ -1200,7 +1178,7 @@ Function GetDeviceInstallInfo(WshShell,sInstalldir,Dev)
                ibaDev(i) = ltrim(cmdout(i-1))\r
        Next\r
 \r
-'      DisplayDevInfo ibaDev,"WinOF Device Info"\r
+'      DisplayDevInfo ibaDev,"OFED Device Info"\r
 \r
        GetDeviceInstallInfo = ibaDev\r
 \r
@@ -1486,7 +1464,7 @@ Sub IB_DriverCleanup()
 '\r
 \r
        ' Remove all Local Area Connection Registry entries which were constructed\r
-       ' for IPoIB. Next WinOF install gets same IPoIB local area connection\r
+       ' for IPoIB. Next OFED install gets same IPoIB local area connection\r
        ' assignment.\r
 \r
        Dim IPOIB_LAC\r
@@ -1537,7 +1515,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
@@ -1561,7 +1539,7 @@ Sub CheckDriversOK()
                ' 10 sec timeout warning box.\r
                WshShell.Popup "WARNING: Possible HCA Driver Startup Failure." _\r
                        & vbCrLf & "  Consult the Windows System Event log! (mlx4_bus)",_\r
-                       10,"WinOF-Install CheckDriversOK",vbInformation+vbSystemModal\r
+                       10,"OFED-Install CheckDriversOK",vbInformation+vbSystemModal\r
 \r
                MsiLogInfo "[CheckDriversOK] ** Possible HCA Driver Startup Failure" & _\r
                                        vbCrLf & "[CheckDriversOK] **   Consult System Event Log."\r
@@ -1580,15 +1558,31 @@ 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
+               ' 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,"OFED-Install CheckDriversOK", _\r
+            vbInformation+vbSystemModal\r
+\r
+               MsiLogInfo "[OFED] ** Possible NetworkDirect startup Failure" & _\r
+                       vbCrLf & "[OFED] **   Waited too long for IBA\IPOIB device?" & _\r
+                       vbCrLf & "[OFED] **   Check ND provider status."\r
                exit Do\r
          End If\r
          err.clear \r
@@ -1686,7 +1680,7 @@ Sub ScheduleLocalReboot
        objSystem.Win32Shutdown 2+4\r
     Next\r
                \r
-    'msgbox "Please wait while computer restarts ...",0,"WinOF"\r
+    'msgbox "Please wait while computer restarts ...",0,"OFED"\r
 \r
 End Sub\r
 \r
@@ -1715,7 +1709,7 @@ End Function
 \r
 \r
 \r
-' Not Used - idea was to run %SystemRoot%\temp\WinOFcleanup.bat on the next\r
+' Not Used - idea was to run %SystemRoot%\temp\OFEDcleanup.bat on the next\r
 ' reboot to remove driver files which did not get uninstalled (win2K3 only);\r
 ' script ran, files persisted on Win2K3?\r
 \r
@@ -1731,7 +1725,7 @@ Sub RunOnceCleanup(fso,sInstalldir)
        Exit Sub\r
   End if\r
 \r
-  script = "RunOnceWinOFcleanup.bat"\r
+  script = "RunOnceOFEDcleanup.bat"\r
   src = sInstalldir & "Drivers\" & script\r
 \r
   If Not fso.FileExists(src) Then\r
@@ -1739,7 +1733,7 @@ Sub RunOnceCleanup(fso,sInstalldir)
        Exit Sub\r
   End if\r
 \r
-  ' copy WinOFclean.bat to %SystemRoot%\temp for runOnce cmd\r
+  ' copy OFEDclean.bat to %SystemRoot%\temp for runOnce cmd\r
   sTemp = fso.GetSpecialFolder(0) & "\temp\" & script\r
   If fso.FileExists(sTemp) Then\r
        Err.clear\r
@@ -1750,10 +1744,10 @@ Sub RunOnceCleanup(fso,sInstalldir)
   fso.CopyFile src, sTemp \r
   If Err.Number = 0 Then\r
       cmd = "cmd.exe /C " & sTemp\r
-      RunAtReboot "WinOF", cmd\r
+      RunAtReboot "OFED", cmd\r
       ' 2nd cmd to remove previous script.\r
 ' XXX      cmd = "cmd.exe /C del /F/Q " & sTemp\r
-'      RunAtReboot "WinOF2", cmd\r
+'      RunAtReboot "OFED2", cmd\r
   End if\r
 \r
 End Sub\r