End Function\r
\r
\r
+' Attempt to clean out driver installed files which fail to be uninstalled\r
+' when the driver is uninstalled. Win2K3/x64 files persist, XP & Win2K3/x86\r
+' the driver files are correctly remove?\r
+ \r
Function RemoveDriverFiles()\r
Dim Win\r
Dim sDRIVERS\r
End If\r
sDRIVERS = sDRIVERS & "drivers\"\r
\r
-' msgbox "RM sDrivers " & sDRIVERS & " sSystemFolder " & sSystemFolder & " sSystem64Folder " & sSystem64Folder \r
-' msgbox " sDrivers " & sDRIVERS\r
-' msgbox " sSystemFolder " & sSystemFolder\r
-' msgbox " sSystem64Folder " & sSystem64Folder\r
- \r
FileDelete(sDRIVERS & "ibbus.sys")\r
FileDelete(sDRIVERS & "mthca.sys")\r
FileDelete(sDRIVERS & "ipoib.sys")\r
FileDelete(sDRIVERS & "vnic.sys")\r
\r
If (MTARCH="amd64") Then\r
-if False Then\r
' System64Folder = System32, SystemFolder = Syswow64\r
' check/remove from .dll cache prior to removal from system32\\r
Dim dllCache\r
FileDelete(sSystem64Folder & "ibwsd.dll")\r
FileDelete(sSystem64Folder & "ibsrp.dll")\r
FileDelete(sSystem64Folder & "ibsrpd.dll")\r
-End if\r
End If \r
\r
' MTARCH=x86 SystemFolder = System32\r
\r
' Not used - run the specified command during next startup.\r
\r
-Function RunAtReboot(run_once_cmd)\r
+Function RunAtReboot(name,run_once_cmd)\r
dim key_name\r
key_name = "Software\Microsoft\Windows\CurrentVersion\RunOnce"\r
- AddRegStringValue key_name,"WinOF",run_once_cmd\r
- msgbox "RunAtReboot() " & run_once_cmd\r
+ AddRegStringValue key_name,name,run_once_cmd\r
+ msgbox "RunAtReboot( " & name & " , " & run_once_cmd & " )"\r
RunAtReboot = 0\r
End Function\r
\r
\r
' opensm.exe is required\r
If Not fso.FileExists(opensmPath) Then\r
- Exit Sub\r
+ Exit Sub\r
End if\r
\r
sc = "sc.exe create opensm binPath= """ &opensmPath _\r
\r
' start opesm as a Service?\r
If fso.FileExists(opensmService) Then\r
- StartMeUp = True\r
- sc = sc & "start= auto"\r
+ StartMeUp = True\r
+ sc = sc & "start= auto"\r
Else\r
- StartMeUp = False\r
- sc = sc & "start= disabled"\r
+ StartMeUp = False\r
+ sc = sc & "start= disabled"\r
End if\r
Return = WshShell.Run ("cmd.exe /c " & sc, 0, true)\r
sc = "sc.exe description opensm ""Configures and manage the InfiniBand Subnet"" "\r
,13,"WinOF - Existing InfiniBand installation Detected")\r
\r
'run_once_cmd = Session.Property("SETUPEXEDIR") & "\setup.exe"\r
- 'RunAtReboot(run_once_cmd)\r
+ 'RunAtReboot "WinOF", run_once_cmd\r
\r
' the _Driver Uninstall call sets reboot=force. The ForceReboot action\r
' following this CustomAction will fire when reboot is set =force.\r
End Function\r
\r
\r
+' Not Used - idea was to run %SystemRoot%\temp\WinOFcleanup.bat on the next\r
+' reboot to remove driver files which did not get uninstalled (win2K3 only);\r
+' script ran, files persisted on Win2K3? WIX call to invoke this Sub were\r
+' removed.\r
+\r
+Sub RunOnceCleanup\r
+ Dim fso, sInstalldir, sTemp, cmd\r
+ Set fso=CreateObject("Scripting.FileSystemObject") \r
+\r
+ On Error Resume Next\r
+\r
+ sInstalldir = Session.Property("REMOVE")\r
+ If sInstalldir <> "ALL" Then\r
+ Exit Sub\r
+ End if\r
+\r
+ sInstalldir = Session.Property("INSTALLDIR")\r
+\r
+ If Not fso.FileExists(sInstalldir & "WinOFclean.bat") Then\r
+ Exit Sub\r
+ End if\r
+\r
+ ' copy WinOFclean.bat to %SystemRoot%\temp for runOnce cmd\r
+ sTemp = fso.GetSpecialFolder(0) & "\temp\WinOFclean.bat"\r
+ Err.clear\r
+ fso.CopyFile sInstalldir & "WinOFclean.bat", sTemp \r
+ If Err.Number = 0 Then\r
+ cmd = "cmd.exe /C " & sTemp\r
+ RunAtReboot "WinOF", cmd\r
+ ' 2nd cmd to remove previous script.\r
+ cmd = "cmd.exe /C del /F/Q " & sTemp\r
+ RunAtReboot "WinOF2", cmd\r
+ End if\r
+\r
+End Sub\r
+\r
\r
' This routine should never be...InstallShield-12 for some reason has\r
' decided not to completely remove [INSTALLDIR]? Until such a time\r