On Error Resume Next \r
Err.clear\r
If fso.FileExists(filename) Then\r
- Set WshShell = CreateObject("WScript.Shell")\r
- Return = WshShell.Run ("cmd.exe /c del /Q /F " & filename, 0, true)\r
- If Err Then\r
- ErrMsg ("Could not delete: " & filename)\r
- End If \r
+ Set WshShell = CreateObject("WScript.Shell")\r
+ Return = WshShell.Run ("cmd.exe /c del /Q /F " & filename, 0, true)\r
+ If Err Then\r
+ ErrMsg ("Could not delete: " & filename)\r
+ End If \r
End If\r
End Function\r
\r
' the driver files are correctly remove?\r
\r
Function RemoveDriverFiles()\r
- Dim Win\r
- Dim sDRIVERS\r
- Dim sSystem64Folder \r
- Dim sInstalldir\r
- Dim sSystemFolder\r
+ Dim Win, sDRIVERS, sSystem64Folder, sInstalldir\r
+ Dim sSystemFolder, CheckMode, PropArray\r
\r
- ' Function can be called from the Driver{Install/Uninstall} rtns.\r
- ' (properties are different).\r
- dim CheckMode\r
- CheckMode = Session.Property("CustomActionData")\r
- If Not CheckMode = "" Then\r
- Dim PropArray\r
- PropArray = Split(Session.Property("CustomActionData"), ";") \r
- Win = PropArray(3)\r
+ ' Function can be called from the Driver{Install/Uninstall} rtns.\r
+ ' (properties are different).\r
+ CheckMode = Session.Property("CustomActionData")\r
+ If Not CheckMode = "" Then\r
+ PropArray = Split(Session.Property("CustomActionData"), ";") \r
+ Win = PropArray(3)\r
sSystem64Folder = PropArray(2)\r
- sSystemFolder = PropArray(1)\r
- sInstalldir = PropArray(0)\r
- Else\r
- Win = Session.Property("WindowsFolder")\r
+ sSystemFolder = PropArray(1)\r
+ sInstalldir = PropArray(0)\r
+ Else\r
+ Win = Session.Property("WindowsFolder")\r
sSystem64Folder = Session.Property("System64Folder") \r
- sInstalldir = Session.Property("INSTALLDIR") \r
- sSystemFolder = Session.Property("SystemFolder") \r
- End if\r
+ sInstalldir = Session.Property("INSTALLDIR") \r
+ sSystemFolder = Session.Property("SystemFolder") \r
+ End if\r
\r
MTARCH = Architecture \r
sDRIVERS = sSystem64Folder \r
If (MTARCH="x86") Then\r
- sDRIVERS = sSystemFolder ' holds Session.Property("SystemFolder")\r
+ sDRIVERS = sSystemFolder ' holds Session.Property("SystemFolder")\r
End If\r
sDRIVERS = sDRIVERS & "drivers\"\r
\r
FileDelete(sDRIVERS & "qlgcvnic.sys")\r
\r
If (MTARCH="amd64") Then\r
- ' System64Folder = System32, SystemFolder = SysWOW64\r
- ' check/remove from .dll cache prior to removal from system32\\r
- Dim dllCache\r
+ ' System64Folder = System32, SystemFolder = SysWOW64\r
+ ' check/remove from .dll cache prior to removal from system32\\r
+ Dim dllCache\r
dllCache = sSystem64Folder & "dllcache\"\r
- FileDelete(dllCache & "ibal.dll")\r
- FileDelete(dllCache & "ibald.dll")\r
- FileDelete(dllCache & "complib.dll")\r
- FileDelete(dllCache & "complibd.dll")\r
- FileDelete(dllCache & "mthcau.dll")\r
- FileDelete(dllCache & "mthcaud.dll")\r
- FileDelete(dllCache & "IbInstaller.dll")\r
- FileDelete(dllCache & "ibwsd.dll")\r
- FileDelete(dllCache & "ibsrp.dll")\r
- FileDelete(dllCache & "ibsrpd.dll")\r
+ FileDelete(dllCache & "ibal.dll")\r
+ FileDelete(dllCache & "ibald.dll")\r
+ FileDelete(dllCache & "complib.dll")\r
+ FileDelete(dllCache & "complibd.dll")\r
+ FileDelete(dllCache & "mthcau.dll")\r
+ FileDelete(dllCache & "mthcaud.dll")\r
+ FileDelete(dllCache & "IbInstaller.dll")\r
+ FileDelete(dllCache & "ibwsd.dll")\r
+ FileDelete(dllCache & "ibsrp.dll")\r
+ FileDelete(dllCache & "ibsrpd.dll")\r
\r
- FileDelete(sSystem64Folder & "ibal.dll")\r
- FileDelete(sSystem64Folder & "ibald.dll")\r
- FileDelete(sSystem64Folder & "complib.dll")\r
- FileDelete(sSystem64Folder & "complibd.dll")\r
- FileDelete(sSystem64Folder & "mthcau.dll")\r
- FileDelete(sSystem64Folder & "mthcaud.dll")\r
- FileDelete(sSystem64Folder & "IbInstaller.dll")\r
- FileDelete(sSystem64Folder & "ibwsd.dll")\r
- FileDelete(sSystem64Folder & "ibsrp.dll")\r
- FileDelete(sSystem64Folder & "ibsrpd.dll")\r
+ FileDelete(sSystem64Folder & "ibal.dll")\r
+ FileDelete(sSystem64Folder & "ibald.dll")\r
+ FileDelete(sSystem64Folder & "complib.dll")\r
+ FileDelete(sSystem64Folder & "complibd.dll")\r
+ FileDelete(sSystem64Folder & "mthcau.dll")\r
+ FileDelete(sSystem64Folder & "mthcaud.dll")\r
+ FileDelete(sSystem64Folder & "IbInstaller.dll")\r
+ FileDelete(sSystem64Folder & "ibwsd.dll")\r
+ FileDelete(sSystem64Folder & "ibsrp.dll")\r
+ FileDelete(sSystem64Folder & "ibsrpd.dll")\r
End If \r
\r
' MTARCH=x86 SystemFolder = System32\r
' MTARCH=amd64 SystemFolder = Syswow64\r
\r
- FileDelete(sSystemFolder & "ibal.dll")\r
- FileDelete(sSystemFolder & "ibald.dll")\r
- FileDelete(sSystemFolder & "complib.dll")\r
- FileDelete(sSystemFolder & "complibd.dll")\r
- FileDelete(sSystemFolder & "mthcau.dll")\r
- FileDelete(sSystemFolder & "mthcaud.dll")\r
- FileDelete(sSystemFolder & "ibsrp.dll")\r
- FileDelete(sSystemFolder & "ibsrpd.dll")\r
- FileDelete(sSystemFolder & "IbInstaller.dll")\r
- FileDelete(sSystemFolder & "ibwsd.dll")\r
- \r
- FileDelete(Win & "lastgood\system32\ibwsd.dll")\r
- FileDelete(Win & "lastgood\SysWOW64\ibwsd.dll")\r
+ FileDelete(sSystemFolder & "ibal.dll")\r
+ FileDelete(sSystemFolder & "ibald.dll")\r
+ FileDelete(sSystemFolder & "complib.dll")\r
+ FileDelete(sSystemFolder & "complibd.dll")\r
+ FileDelete(sSystemFolder & "mthcau.dll")\r
+ FileDelete(sSystemFolder & "mthcaud.dll")\r
+ FileDelete(sSystemFolder & "ibsrp.dll")\r
+ FileDelete(sSystemFolder & "ibsrpd.dll")\r
+ FileDelete(sSystemFolder & "IbInstaller.dll")\r
+ FileDelete(sSystemFolder & "ibwsd.dll")\r
+\r
+ FileDelete(Win & "lastgood\system32\ibwsd.dll")\r
+ FileDelete(Win & "lastgood\SysWOW64\ibwsd.dll")\r
\r
' delete opensm files\r
Dim fso\r
PFILES = Split(PnfFiles,vbCrLf)\r
\r
For Each file in IFILES\r
- If (file <> "") Then\r
- FileDelete(file)\r
- End IF\r
+ If (file <> "") Then\r
+ FileDelete(file)\r
+ End IF\r
Next\r
\r
For Each file in PFILES\r
If (file <> "") Then\r
- FileDelete(file)\r
+ FileDelete(file)\r
End IF\r
Next\r
\r
End Function\r
\r
+\r
''''''''''' Delete registry key ''''''''''''\r
\r
Function DeleteRegKey(KeyPath)\r
devman = "cmd.exe /c cd " & sInstalldir & "IBcore & devman.exe "\r
devmanNET = "cmd.exe /c cd " & sInstalldir & "net & " & devmanEXE1\r
devmanQL = "cmd.exe /c cd " & sInstalldir & "qlgcvnic & " & devmanEXE1\r
+ devmanSRP = "cmd.exe /c cd " & sInstalldir & "SRP & " & devmanEXE1\r
\r
Uninstall_IB_Devices(sInstalldir) \r
\r
\r
' rescan system buses\r
Return = WshShell.Run (devman & "rescan", 0, true)\r
- ' Display error number and description if applicable\r
+ ' Display error number and description if applicable\r
If Err Then ShowError\r
If Return <> 0 Then\r
msgbox "Driver Install - HCA Ret " & Return & " Err " & Err\r
\r
' Install HCA Driver\r
Return = WshShell.Run (devman & "update mthca.inf PCI\VEN_15B3", 0, true)\r
- ' Display error number and description if applicable\r
+ ' Display error number and description if applicable\r
If Err Then ShowError\r
-\r
If Return <> 0 Then\r
msgbox "Driver Install - HCA Ret " & Return & " Err " & Err\r
DriverInstall=Return\r
If Err Then ShowError\r
End If\r
\r
- ' Copy 32 bit dlls on 64-bit architectures\r
- ' PropArray() 0-INSTALLDIR; 1-SystemFolder; 2-System64Folder 3-WindowsFolder\r
-\r
- If (MTARCH="amd64") Then\r
- Dim SYSWOW\r
- SYSWOW = PropArray(1) \r
-\r
-' following file copies relocated to .wxs file so they can be uninstalled \r
-' correctly, otherwise, using this approach the files reamin when uninstalled.\r
-\r
-if False then\r
- msgbox "DriverInstall PA(1) " & SYSWOW & " PA(2) " & PropArray(2)\r
- if fso.FileExists(sInstalldir & "IBcore\cl32.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\cl32.dll", SYSWOW & "complib.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "IBcore\cl32d.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\cl32d.dll", SYSWOW & "complibd.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "IBcore\ibal32.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\ibal32.dll", SYSWOW & "ibal.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "IBcore\ibal32d.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\ibal32d.dll", SYSWOW & "ibald.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "IBcore\mtuvpd32.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\mtuvpd32.dll", SYSWOW & "mthcau.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "IBcore\mtuvpd32d.dll") then\r
- fso.CopyFile sInstalldir & "IBcore\mtuvpd32d.dll",SYSWOW & "mthcaud.dll"\r
- end if\r
- if fso.FileExists(sInstalldir & "net\ibwsd32.dll") then\r
- fso.CopyFile sInstalldir & "net\ibwsd32.dll", SYSWOW & "ibwsd.dll"\r
- end if\r
-end if ' XXX\r
- End If ' MTARCH\r
-\r
' Install Qlogic VNIC Driver\r
- if fso.FileExists(sInstalldir & "qlgcvnic\netvnic.inf") Then\r
- devID = "IBA\V00066aP00000030"\r
+ If fso.FileExists(sInstalldir & "qlgcvnic\netvnic.inf") Then\r
+ devID = "IBA\V00066AP00000030"\r
Err.clear\r
Return = WshShell.Run (devmanQL & "disable " & devID, 0, true)\r
\r
\r
' Display error number and description if applicable\r
If Err Then ShowErr2("qlgcvnic\qlgcvnic.sys")\r
+\r
+ Return = WshShell.Run (devmanQL & "enable " & devID, 0, true)\r
End if\r
\r
+ ' Install SRP (SCSI RDMA Protocol) Driver\r
+ If fso.FileExists(sInstalldir & "SRP\ib_srp.inf") Then\r
+ Err.clear\r
+ ' QLogic Virtual FC I/O controller or\r
+ 'InfiniBand SRP Miniport: IBA\C0100C609EP0108 or IBA\CFF00C609EP0108\r
+ ' one driver handles all three.\r
+ devID = "IBA\V00066AP00000038"\r
+ Return = WshShell.Run (devmanSRP & "update ib_srp.inf " & devID,0,true)\r
+ ' Display error number and description if applicable\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
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
- ' Removing\r
- 'msgbox "RmDev " & device(0) ' XXX\r
- Return = WshShell.Run (devmanRMAT & device(0), 0, true)\r
- End if\r
- Next\r
+ For each deviceCan in devices\r
+ If (Instr(deviceCan,"IBA\IPOIB")) Then\r
+ device = split(deviceCan, " ")\r
+ ' Remove IPoIB instance\r
+ Return = WshShell.Run (devmanRMAT & device(0), 0, true)\r
+ End if\r
+ Next\r
\r
- ' Removing SRP - Search for I/O UNIT and then remove it.\r
- for each deviceCan in devices\r
- if (Instr(deviceCan,"InfiniBand I/O Unit")) Then\r
- device = split(deviceCan, " ")\r
- ' Removing I/O Unit of the SRP\r
- Return = WshShell.Run (devmanRMAT & device(0), 0, true)\r
- End if\r
- Next\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
+ ' Removing I/O Unit of the SRP\r
+ Return = WshShell.Run (devmanRMAT & device(0), 0, true)\r
+ End if\r
+ Next\r
\r
- ' Remove VNIC instances\r
- for each deviceCan in devices\r
- if (Instr(deviceCan,"IBA\QLCGVNIC")) Then\r
- device = split(deviceCan, " ")\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 - Searching for SRP devices.\r
- for each deviceCan in devices\r
- if (Instr(deviceCan,"SRP")) Then\r
- device = split(deviceCan, " ")\r
- ' Removing SRP\r
- Return = WshShell.Run (devmanRMAT & device(0), 0, true)\r
- End if\r
- Next\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\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
+ ' 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
+ \r
Set objWshScriptExec = wshShell.Exec(devman & " FindAll * | FIND ""IPOIB""")\r
If Err Then ShowError\r
Set objStdOut = objWshScriptExec.StdOut\r