]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[WinOF-ND] somehow missed this one?
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sat, 9 Aug 2008 00:17:16 +0000 (00:17 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sat, 9 Aug 2008 00:17:16 +0000 (00:17 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@1471 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/WinOF/WIX/CustomActions.vbs

index 63626d070039e91215dec074e7a396e5e4f138ef..55f74e4f5db3af88d5ab917aac9db7062efc1fb6 100644 (file)
@@ -870,21 +870,9 @@ Function Uninstall_IB_Devices(sInstalldir)
           Exit Function ' no reason to continue without the tool.\r
       End if\r
 \r
-         ' Prepare to disable then remove IB devices\r
       ' create a list of IBA\* devices via 'devcon findall'\r
 \r
       devices = FindDevices\r
-      \r
-      ' Remove IPoIB Adapter instances\r
-      For each deviceCan in devices\r
-          If (Instr(deviceCan,"IBA\IPOIB")) Then\r
-              device = split(deviceCan, " ")\r
-                         ' disable the instance\r
-             Return = WshShell.Run (devmanDAAT & device(0), 0, true)\r
-              ' now Remove the IPoIB instance\r
-             Return = WshShell.Run (devmanRMAT & device(0), 0, true)\r
-          End if\r
-      Next\r
 \r
       ' Remove SRP device - QLogic Virtual FC I/O controller instance?\r
       For each deviceCan in devices\r
@@ -933,22 +921,18 @@ Function Uninstall_IB_Devices(sInstalldir)
               Return = WshShell.Run (devmanRMAT & dt, 0, true)\r
           End if\r
       Next\r
-      Return = WshShell.Run (devman & "remove IBA\IB_IOU",0,true)\r
-\r
-         ' remove IPoIB devices\r
-      Set objWScriptExec = wshShell.Exec(devman & " FindAll * | FIND ""IPOIB""")\r
-      If Err Then ShowError\r
-      Set objStdOut = objWScriptExec.StdOut\r
+      Return = WshShell.Run (devman & "remove IBA\IB_IOU*",0,true)\r
 \r
-      While Not objStdOut.AtEndOfStream\r
-          strLine = objStdOut.ReadLine\r
-          device = split(strLine, " ")\r
-          Return = wshShell.run(devmanRMAT & device(0),0,true)\r
-      Wend\r
+         ' Disable and Remove IPoIB devices\r
+      Return = WshShell.Run (devmanDAAT & "IBA\IPOIB\*", 0, true)\r
+      Return = WshShell.Run (devmanRMAT & "IBA\IPOIB\*", 0, true)\r
 \r
       ' Remove HCAs\r
-      Return = WshShell.Run (devman & "disable PCI\VEN_15B3", 0, true)\r
-      Return = WshShell.Run (devman & "remove PCI\VEN_15B3", 0, true)\r
+      ' Return = WshShell.Run (devman & "disable PCI\VEN_15B3*", 0, true)\r
+      ' Return = WshShell.Run (devman & "remove PCI\VEN_15B3*", 0, true)\r
+\r
+      Return = WshShell.Run (devmanDAAT & "PCI\VEN_15B3*", 0, true)\r
+      Return = WshShell.Run (devmanRMAT & "PCI\VEN_15B3*", 0, true)\r
       If Err Then ShowError\r
 \r
       ' Remove InfiniBand Bus/Fabric class driver\r
@@ -979,13 +963,18 @@ Sub DriverUninstall()
       Set WshShell = CreateObject("WScript.Shell")\r
       Set fso = CreateObject("Scripting.FileSystemObject")\r
 \r
-      ' WSD doesn't work on XP and should NOT be installed; just in case.\r
-      ' if WSD installed, then it's enabled, shut down the service\r
+      ' WSD is not support on XP and should NOT have been installed.\r
+      ' otherwise, remove the service: ND (Network Direct) then WinSock Direct.\r
 \r
-      If (Session.Property("VersionNT") <> 501) AND _\r
-          fso.FileExists(sInstalldir & "installsp.exe") Then\r
-         Return = WshShell.Run ("cmd.exe /c cd " & sInstalldir & _\r
+      If (Session.Property("VersionNT") <> 501) Then\r
+          if fso.FileExists(sInstalldir & "ndinstall.exe") Then\r
+             Return = WshShell.Run ("cmd.exe /c cd " & sInstalldir & _\r
+                                 " & ndinstall.exe -r", 0, true)\r
+          End If\r
+          if fso.FileExists(sInstalldir & "installsp.exe") Then\r
+             Return = WshShell.Run ("cmd.exe /c cd " & sInstalldir & _\r
                                  " & installsp.exe -r", 0, true)\r
+          End If\r
       End If\r
       \r
       ' stop the openSM service in case it was started.\r
@@ -1050,7 +1039,11 @@ End Sub
 \r
 \r
 ' Enable WSD if installsp.exe was installed (feature Winsock direct selected).\r
-' For Windows XP, this CA should not be called as WSD is not supported on XP.\r
+' For Windows XP, this CustomAction should not be called as WSD is not\r
+' supported on XP.\r
+' ND (Network Direct) is closely bound to WSD and follows the same support\r
+' rules. If the WSD feature is selected (default is selected, except for XP)\r
+' then installsp.exe & ndinstall.exe will be present. Enable WSD & ND.\r
 \r
 Sub WSDEnable()\r
       Dim sInstalldir, WshShell, fso\r
@@ -1062,11 +1055,19 @@ Sub WSDEnable()
 \r
       If fso.FileExists(sInstalldir & "installsp.exe") Then\r
           ' install the WinSockdirect service\r
-         Return = WshShell.Run ("cmd.exe /c cd " & sInstalldir & " & installsp.exe -i", 0, true)\r
+         Return = WshShell.Run ("cmd.exe /c cd " & sInstalldir _\r
+                                 & " & installsp.exe -i", 0, true)\r
       End If\r
+      If Err Then ShowError\r
 \r
-      ' Display error number and description if applicable\r
+      ' Start the Network Direct Service.\r
+      If fso.FileExists(sInstalldir & "ndinstall.exe") Then\r
+          ' install the Network Direct Service\r
+         Return = WshShell.Run ("cmd.exe /c cd " & sInstalldir _\r
+                                 & " & ndinstall.exe -i", 0, true)\r
+      End If\r
       If Err Then ShowError\r
+\r
 End Sub\r
 \r
 \r