Sub WinOF_setup\r
'\r
' Driver Install Properties:\r
- ' 0-INSTALLDIR; 1-SystemFolder; 2-System64Folder; 3-WindowsFolder\r
+ ' 0-INSTALLDIR; 1-SystemFolder; 2-System64Folder; 3-WindowsFolder ; 4-VersionNT\r
\r
Session.Property("DriverInstall") = Session.Property("INSTALLDIR") & _\r
";" & Session.Property("SystemFolder") & ";" & _\r
Session.Property("System64Folder") & ";" & _\r
- Session.Property("WindowsFolder") \r
+ Session.Property("WindowsFolder") & ";" & _\r
+ Session.Property("VersionNT") \r
\r
End Sub\r
\r
FileDelete(Win & "lastgood\SysWOW64\ibwsd.dll")\r
FileDelete(Win & "lastgood\SysWOW64\mthcau.dll")\r
FileDelete(Win & "lastgood\SysWOW64\mthcaud.dll")\r
+\r
+ FileDelete(Win & "winverbs.lib")\r
+ FileDelete(sDRIVERS & "winverbs.sys")\r
+ FileDelete(sSYS32 & "winverbs.dll")\r
+ FileDelete(sSYS32 & "winverbsd.dll")\r
\r
' delete opensm files\r
Dim fso\r
\r
Dim PropArray, devID, devman, devmanEXE, devmanNET, devmanQL\r
Dim rc, cmd, CheckMode, sInstalldir, fso\r
- Dim DrvInstalled, IBbusGUID, idev, mlxdev\r
+ Dim DrvInstalled, idev, mlxdev, dev, dev_list\r
\r
On Error Resume Next\r
\r
'in defered action this is the way to pass arguments.\r
PropArray = Split(Session.Property("CustomActionData"), ";")\r
Else\r
- Redim PropArray(4)\r
+ Redim PropArray(5)\r
PropArray(0) = Session.Property("INSTALLDIR") \r
PropArray(1) = Session.Property("SystemFolder") \r
PropArray(2) = Session.Property("System64Folder") \r
PropArray(3) = Session.Property("WindowsFolder")\r
+ PropArray(4) = Session.Property("VersionNT")\r
End if\r
\r
sInstalldir = PropArray(0)\r
+ sVersionNT = PropArray(4)\r
+\r
+ dpinstEXE = sInstalldir & "IBcore\dpinst.exe "\r
+ dpinstEXE1 = "..\IBcore\dpinst.exe "\r
+ dpinst = "cmd.exe /c cd /d " & sInstalldir & "IBcore & dpinst.exe "\r
+ dpinstNET = "cmd.exe /c cd /d " & sInstalldir & "net & " & dpinstEXE1\r
+ dpinstQL = "cmd.exe /c cd /d " & sInstalldir & "qlgcvnic & " & dpinstEXE1\r
+ dpinstSRP = "cmd.exe /c cd /d " & sInstalldir & "SRP & " & dpinstEXE1\r
+ dpinstWV = "cmd.exe /c cd /d " & sInstalldir & "winverbs & " & dpinstEXE1\r
\r
devmanEXE = sInstalldir & "IBcore\devman.exe "\r
devmanEXE1 = "..\IBcore\devman.exe "\r
devmanNET = "cmd.exe /c cd /d " & sInstalldir & "net & " & devmanEXE1\r
devmanQL = "cmd.exe /c cd /d " & sInstalldir & "qlgcvnic & " & devmanEXE1\r
devmanSRP = "cmd.exe /c cd /d " & sInstalldir & "SRP & " & devmanEXE1\r
+ devmanWV = "cmd.exe /c cd /d " & sInstalldir & "winverbs & " & devmanEXE1\r
\r
Set WshShell = CreateObject("WScript.Shell")\r
Set fso = CreateObject("Scripting.FileSystemObject")\r
\r
+ If Not fso.FileExists(dpinstEXE) Then\r
+ msgbox "Driver Install - missing file WinOF\" & dpinstEXE\r
+ DriverInstall=ERROR_FUNCTION_FAILED \r
+ Exit Function\r
+ End if\r
+\r
If Not fso.FileExists(devmanEXE) Then\r
msgbox "Driver Install - missing file WinOF\" & devmanEXE\r
DriverInstall=ERROR_FUNCTION_FAILED \r
Exit Function\r
End if\r
\r
- ' Install an HCA (Host Channel Adapter) Driver\r
- ' Install mthca 2nd as it can tolerate a previously installed IBBUS driver.\r
+ ' Install HCA (Host Channel Adapter) Driver(s)\r
\r
DrvInstalled = false\r
- IBbusGUID = "{94f41ced-78eb-407c-b5df-958040af0fd8}"\r
\r
' what HCAs are selected to install?\r
have_mlx4 = 0\r
have_mthca = 1\r
End If\r
\r
- have_mixed_HCAs = 0\r
- If have_mthca AND have_mlx4 Then\r
- have_mixed_HCAs = 1\r
- End If\r
+ dev_list = Find_PCI_devs(devman,"VEN_15B3")\r
\r
- ' Need to install ConnectX (mlx4) HCA driver?\r
+ ' Install ConnectX (mlx4) HCA driver?\r
\r
If have_mlx4 Then\r
- ' if not mixed HCA types, then install based on Vendor ID\r
- If have_mixed_HCAs = 0 Then\r
- cmd = devman & "install mlx4_bus.inf PCI\VEN_15B3"\r
- Return = WshShell.Run (cmd,0,true)\r
- If Return = 0 Then\r
- DrvInstalled = true\r
- End If\r
- Else\r
- ' install mlx4_bus, be specific as VEN_15B3 is not unique between\r
- ' mlx4 and InfiniHost (mthca) devices.\r
-\r
- dev_list = Find_PCI_devs(devman,"VEN_15B3")\r
- cmd = "No matching mlx4 Device IDs found?"\r
- For each Dev in dev_list\r
- If Dev <> "" Then\r
- mlxdev = Left(Dev,(Instr(dev,"SUBSYS")-2))\r
- DevID = Right(mlxdev,4)\r
- If IsInfiniHost( DevID ) = 0 Then\r
- cmd = devman & "install mlx4_bus.inf """ & mlxdev & """"\r
- Return = WshShell.Run (cmd,0,true)\r
-' msgbox "rc " & Return & " " & cmd\r
- If Return = 0 Then\r
- DrvInstalled = true\r
- Exit For\r
- End If\r
- End if\r
+\r
+ ' install mlx4_bus, be specific as VEN_15B3 is not unique between mlx4\r
+ ' and InfiniHost (mthca) devices.\r
+\r
+ cmd = ""\r
+ For each Dev in dev_list\r
+ If Dev <> "" Then\r
+ mlxdev = Left(Dev,(Instr(dev,"SUBSYS")-2))\r
+ devID = Right(mlxdev,4)\r
+ If IsInfiniHost( devID ) = 0 Then\r
+ cmd = devman & "install mlx4_bus.inf """ & mlxdev & """"\r
+ Return = WshShell.Run (cmd,0,true)\r
+' msgbox "mlx4_bus(" & Return & ") " & cmd\r
+ If Return = 0 Then\r
+ DrvInstalled = true\r
+ Exit For\r
+ End If\r
End if\r
- Next\r
- End if\r
+ End if\r
+ Next\r
\r
If DrvInstalled <> true Then\r
- msgbox "ConnectX HCA Install failed (" & Return & ") - " & cmd\r
- Return = WshShell.Run (devman & "remove " & IBbusGUID,0,true)\r
+ msgbox "mlx4_bus Install failed(" & Return & ") " & cmd\r
DriverInstall=ERROR_INSTALL_FAILURE\r
Exit Function\r
End if\r
\r
cmd = devman & "install mlx4_hca.inf MLX4\CONNECTX_HCA"\r
Return = WshShell.Run (cmd,0,true)\r
+\r
' Display error number and description if applicable\r
- If Err Then ShowError\r
If Return <> 0 Then\r
- msgbox "HCA Install - mlx4_hca.inf MLX4\CONNECTX_HCA Ret=" _\r
- & Return & " Err=" & Err\r
+ msgbox "mlx4_hca Install Failed (" & Return & ") " & cmd\r
DriverInstall=ERROR_INSTALL_FAILURE\r
' cleanup device database.\r
Return = WshShell.Run (devman & "remove " & mlxdev, 0, true)\r
- Return = WshShell.Run (devman & "remove " & IBbusGUID,0,true)\r
Exit Function\r
- End If\r
+ End if\r
End If\r
\r
- ' Need an InfiniHost (mthca) HCA driver?\r
+ ' InfiniHost (mthca) HCA driver?\r
\r
If have_mthca Then\r
DrvInstalled = false\r
- ' if not mixed HCA types, then install based on Vendor ID\r
- If have_mixed_HCAs = 0 Then\r
- cmd = devman & "install mthca.inf PCI\VEN_15B3"\r
- Return = WshShell.Run (cmd,0,true)\r
- If Return = 0 Then\r
- DrvInstalled = true\r
- End If\r
- Else\r
- ' install InfiniHost (mthca), be specific as VEN_15B3 is not unique\r
- ' between mlx4 and InfiniHost (mthca) devices.\r
- dev_list = Find_PCI_devs(devman,"VEN_15B3")\r
- cmd = "No InfiniHost Device IDs found?"\r
- For each dev in dev_list\r
- If dev <> "" Then\r
- idev = Left(dev,(Instr(dev,"SUBSYS")-2))\r
- DevID = Right(idev,4)\r
- If IsInfiniHost( DevID ) = 1 Then\r
- cmd = devman & "install mthca.inf """ & idev & """"\r
- Return = WshShell.Run (cmd,0,true)\r
- If Return = 0 Then\r
- DrvInstalled = true\r
- Exit For\r
- End If\r
- End if\r
- End If\r
- Next\r
- End If\r
+\r
+ cmd = ""\r
+ For each dev in dev_list\r
+ If dev <> "" Then\r
+ idev = Left(dev,(Instr(dev,"SUBSYS")-2))\r
+ devID = Right(idev,4)\r
+ If IsInfiniHost( devID ) = 1 Then\r
+ cmd = devman & "update mthca.inf """ & idev & """"\r
+ Return = WshShell.Run (cmd,0,true)\r
+ If Return = 0 Then\r
+ DrvInstalled = true\r
+ Exit For\r
+ End If\r
+ End if\r
+ End if\r
+ Next\r
\r
If DrvInstalled <> true Then\r
- msgbox "InfiniHost(mthca) HCA Install failed (" & Return & _\r
- ") - " & cmd\r
- ' cleanup device database.\r
- Return = WshShell.Run (devman & "remove " & IBbusGUID,0,true)\r
+ msgbox "InfiniHost(mthca) Install failed (" & Return & ") " & cmd\r
DriverInstall=ERROR_INSTALL_FAILURE\r
Exit Function\r
End if\r
\r
' Check/install IPoIB driver\r
If fso.FileExists(sInstalldir & "net\netipoib.inf") Then\r
- rc = WshShell.Run (devmanNET & "update netipoib.inf IBA\IPoIB",0,true)\r
- If Err Then ShowError\r
+ rc = WshShell.Run (devmanNET & "update netipoib.inf IBA\IPoIB",0,true)\r
+ If Err Then ShowError\r
End If\r
\r
' IB I/O Unit driver installed only if required by VNIC or SRP.\r
If Err Then ShowErr2("SRP\ib_srp.inf")\r
End if\r
\r
- ' append [INSTALLDIR] to system search path\r
- ' WIX <Environment> now does this \r
- ' SysPathAdd(sInstalldir)\r
+ If fso.FileExists(sInstalldir & "Xwinverbs\winverbs.inf") Then\r
+ cmd = devmanWV & "classfilter InfinibandController upper +winverbs"\r
+ Return = WshShell.Run (cmd,0,true)\r
+ If Return <> 1 Then msgbox "winverbs\winverbs.inf(" & Return & ")"\r
+\r
+ cmd = devmanWV & "disable =InfinibandController"\r
+ Return = WshShell.Run (cmd,0,true)\r
+ If Return <> 1 Then msgbox "winverbs\disable(" & Return & ")"\r
+\r
+ cmd = devmanWV & "enable =InfinibandController"\r
+ Return = WshShell.Run (cmd,0,true)\r
+ If Return <> 1 Then msgbox "winverbs\enable(" & Return & ")"\r
+ End If\r
+\r
err.clear \r
DriverInstall=0\r
\r
\r
Function Uninstall_IB_Devices(sInstalldir)\r
\r
- Dim WshShell, fso, devices, devman, devmanRMAT\r
+ Dim WshShell, fso, devices, cmd, dpinst, devman, devmanRMAT\r
\r
- devman = "cmd.exe /c cd " & sInstalldir & "IBcore & devman.exe "\r
- devmanRMAT = devman & "remove @"\r
- devmanDAAT = devman & "disable @"\r
+ dpinst = "cmd.exe /c cd /d " & sInstalldir & "IBcore & dpinst.exe "\r
+ dpinstNET = "cmd.exe /c cd /d " & sInstalldir & "net & ..\IBcore\dpinst.exe "\r
+ devman = "cmd.exe /c cd /d " & sInstalldir & "IBcore & devman.exe "\r
\r
- Set WshShell = CreateObject("WScript.Shell")\r
- Set fso = CreateObject("Scripting.FileSystemObject")\r
+ devmanRMAT = devman & "remove @"\r
+ devmanDAAT = devman & "disable @"\r
\r
- If (fso.FileExists(sInstalldir & "IBcore\devman.exe") = False) Then\r
- Exit Function ' no reason to continue without the tool.\r
- End if\r
+ Set WshShell = CreateObject("WScript.Shell")\r
+ Set fso = CreateObject("Scripting.FileSystemObject")\r
+\r
+ If (fso.FileExists(sInstalldir & "IBcore\dpinst.exe") = False) Then\r
+ Exit Function ' no reason to continue without the tool.\r
+ End if\r
\r
- ' create a list of IBA\* devices via 'devcon findall'\r
+ If (fso.FileExists(sInstalldir & "IBcore\devman.exe") = False) Then\r
+ Exit Function ' no reason to continue without the tool.\r
+ End if\r
\r
- devices = FindDevices\r
+ ' create a list of IBA\* devices via 'devcon findall'\r
\r
- ' Remove SRP device - QLogic Virtual FC I/O controller instance?\r
- For each deviceCan in devices\r
- If (Instr(deviceCan,"IBA\V00066AP00000038")) Then\r
- device = split(deviceCan, " ")\r
+ devices = FindDevices\r
+\r
+ ' Remove SRP device - QLogic Virtual FC I/O controller instance?\r
+ For each deviceCan in devices\r
+ If (Instr(deviceCan,"IBA\V00066AP00000038")) Then\r
+ device = split(deviceCan, " ")\r
' disable the instance\r
- Return = WshShell.Run (devmanDAAT & device(0), 0, true)\r
- ' Removing I/O Unit of the SRP\r
- Return = WshShell.Run (devmanRMAT & device(0), 0, true)\r
- End if\r
- Next\r
+ Return = WshShell.Run (devmanDAAT & device(0), 0, true)\r
+ ' Removing I/O Unit of the SRP\r
+ Return = WshShell.Run (devmanRMAT & device(0), 0, true)\r
+ End if\r
+ Next\r
\r
- ' Removing SRP miniport devices.\r
- ' Either: IBA\C0100C609EP0108 or IBA\CFF00C609EP0108\r
- For each devTarget in devices\r
- If (Instr(devTarget,"00C609EP0108")) Then\r
- device = split(devTarget, " ")\r
+ ' Removing SRP miniport devices.\r
+ ' Either: IBA\C0100C609EP0108 or IBA\CFF00C609EP0108\r
+ For each devTarget in devices\r
+ If (Instr(devTarget,"00C609EP0108")) Then\r
+ device = split(devTarget, " ")\r
' disable the instance\r
- Return = WshShell.Run (devmanDAAT & device(0), 0, true)\r
- ' Removing SRP\r
- Return = WshShell.Run (devmanRMAT & device(0), 0, true)\r
- End if\r
- Next\r
+ Return = WshShell.Run (devmanDAAT & device(0), 0, true)\r
+ ' Removing SRP\r
+ Return = WshShell.Run (devmanRMAT & device(0), 0, true)\r
+ End if\r
+ Next\r
\r
- ' Remove QLogic VNIC instances\r
- For each devTarget in devices\r
- If (Instr(devTarget,"IBA\V00066AP00000030")) Then\r
- device = split(devTarget, ":")\r
- dt = rtrim(device(0))\r
+ ' Remove QLogic VNIC instances\r
+ For each devTarget in devices\r
+ If (Instr(devTarget,"IBA\V00066AP00000030")) Then\r
+ device = split(devTarget, ":")\r
+ dt = rtrim(device(0))\r
' disable the instance\r
- Return = WshShell.Run (devmanDAAT & dt, 0, true)\r
- ' Removing the Qlogic Vnic I/O Unit\r
+ Return = WshShell.Run (devmanDAAT & dt, 0, true)\r
+ ' Removing the Qlogic Vnic I/O Unit\r
'msgbox "RmDev '" & dt & "'"\r
- Return = WshShell.Run (devmanRMAT & dt, 0, true)\r
- End if\r
- Next\r
+ Return = WshShell.Run (devmanRMAT & dt, 0, true)\r
+ End if\r
+ Next\r
\r
- ' remove any lingering IB I/O Units\r
- For each devTarget in devices\r
- If (Instr(devTarget,"IBA\IB_IOU")) Then\r
- device = split(devTarget, ":")\r
- dt = rtrim(device(0))\r
- Return = WshShell.Run (devmanDAAT & dt, 0, true)\r
- ' Removing the I/O Unit\r
+ ' remove any lingering IB I/O Units\r
+ For each devTarget in devices\r
+ If (Instr(devTarget,"IBA\IB_IOU")) Then\r
+ device = split(devTarget, ":")\r
+ dt = rtrim(device(0))\r
+ Return = WshShell.Run (devmanDAAT & dt, 0, true)\r
+ ' Removing the I/O Unit\r
'msgbox "RmDev '" & dt & "'"\r
- Return = WshShell.Run (devmanRMAT & dt, 0, true)\r
- End if\r
- Next\r
- Return = WshShell.Run (devman & "remove IBA\IB_IOU*",0,true)\r
+ Return = WshShell.Run (devmanRMAT & dt, 0, true)\r
+ End if\r
+ Next\r
\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
+ Return = WshShell.Run (devmanDAAT & "IBA\IPOIB\*", 0, true)\r
+ Return = WshShell.Run (devmanRMAT & "IBA\IPOIB\*", 0, true)\r
\r
- ' Disable & Remove HCAs\r
+ ' uninstall netipoib.inf files\r
+ cmd = dpinstNET & "/U """ & sInstalldir & "net" & "\netipoib.inf"" /S /D"\r
\r
- Return = WshShell.Run (devmanDAAT & "PCI\VEN_15B3*", 0, true)\r
- Return = WshShell.Run (devmanRMAT & "PCI\VEN_15B3*", 0, true)\r
+ ' Disable & Remove HCAs\r
\r
- ' ibbus GUID\r
- Return = WshShell.Run (devman & "remove {94F41CED-78EB-407C-B5DF-958040AF0FD8",0,true)\r
- Return = WshShell.Run (devmanRMAT & "ROOT\INFINIBANDCONTROLLER\*",0,true)\r
- Return = WshShell.Run (devmanRMAT & "MLX4\CONNECTX_HCA\*", 0, true)\r
+ Return = WshShell.Run (devmanDAAT & "PCI\VEN_15B3*", 0, true)\r
+ Return = WshShell.Run (devmanRMAT & "PCI\VEN_15B3*", 0, true)\r
\r
- ' Remove InfiniBand Bus/Fabric class driver\r
+ ' ibbus GUID\r
+ Return = WshShell.Run (devman & "remove {94F41CED-78EB-407C-B5DF-958040AF0FD8",0,true)\r
+ Return = WshShell.Run (devmanRMAT & "ROOT\INFINIBANDCONTROLLER\*",0,true)\r
+ Return = WshShell.Run (devmanRMAT & "MLX4\CONNECTX_HCA\*", 0, true)\r
\r
- Set objWScriptExec = wshShell.Exec(devman & "FindAll * | FIND ""InfiniBand Fabric"" ")\r
- If Err Then ShowError\r
+ ' Remove InfiniBand Bus/Fabric class driver\r
+\r
+ Set objWScriptExec = wshShell.Exec(devman & "FindAll * | FIND ""InfiniBand Fabric"" ")\r
+ If Err Then ShowError\r
+\r
+ Set objStdOut = objWScriptExec.StdOut\r
+\r
+ While Not objStdOut.AtEndOfStream\r
+ strLine = objStdOut.ReadLine\r
+ device = split(strLine, " ")\r
+ Return = wshShell.Run(devmanRMAT & device(0),0,true)\r
+ If Err Then ShowError\r
+ Wend\r
+\r
+ ' uninstall HCA xxx.inf files\r
+\r
+ If fso.FileExists(sInstalldir & "IBcore\ib_iou.inf") Then\r
+ cmd = dpinst & "/U """ & sInstalldir & "IBcore\ib_iou.inf"" /S /D"\r
+ Return = WshShell.Run (cmd, 0, true)\r
+ End if\r
+\r
+ If fso.FileExists(sInstalldir & "IBcore\mthca.inf") Then\r
+ cmd = dpinst & "/U """ & sInstalldir & "IBcore\mthca.inf"" /S /D"\r
+ Return = WshShell.Run (cmd, 0, true)\r
+ End if\r
+\r
+ If fso.FileExists(sInstalldir & "IBcore\mlx4_hca.inf") Then\r
+\r
+ cmd = dpinst & "/U """ & sInstalldir & "IBcore\mlx4_hca.inf"" /S /D"\r
+ Return = WshShell.Run (cmd, 0, true)\r
\r
- Set objStdOut = objWScriptExec.StdOut\r
+ cmd = dpinst & "/U """ & sInstalldir & "IBcore\mlx4_bus.inf"" /S /D"\r
+ Return = WshShell.Run (cmd, 0, true)\r
+ End if\r
\r
- While Not objStdOut.AtEndOfStream\r
- strLine = objStdOut.ReadLine\r
- device = split(strLine, " ")\r
- Return = wshShell.Run(devmanRMAT & device(0),0,true)\r
- If Err Then ShowError\r
- Wend\r
+ Uninstall_IB_Devices = 0\r
\r
End Function\r
\r