From: Stan Smith Date: Thu, 15 Apr 2010 21:31:55 +0000 (+0000) Subject: [OFED/WIX] replace numeric value indicating Window Style with a constant 'WindowStyle'. X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=7fdb87acf79517ec62716c0c1af3956a64668d11;p=~shefty%2Frdma-win.git [OFED/WIX] replace numeric value indicating Window Style with a constant 'WindowStyle'. git-svn-id: svn://openib.tc.cornell.edu/gen1@2789 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/trunk/OFED/WIX/CustomActions.vbs b/trunk/OFED/WIX/CustomActions.vbs index 7821f166..0d207617 100644 --- a/trunk/OFED/WIX/CustomActions.vbs +++ b/trunk/OFED/WIX/CustomActions.vbs @@ -34,6 +34,9 @@ ' ' $Id$ +' //msdn.microsoft.com/en-us/library/d5fk67ky(VS.85).aspx +Const WindowStyle = 7 + ' VersionNT values Const WindowsXP ="501" Const WindowsSvr2003 ="502" @@ -218,7 +221,7 @@ Sub DriverFileDelete(fso,WshShell,filename) On Error Resume Next ' unlock the driver file by deleting PnPLocked reg entry. base = "reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\PnpLockdownFiles /v " - Return = WshShell.Run (base & filename & " /f", 0, true) + Return = WshShell.Run (base & filename & " /f", WindowStyle, true) fso.DeleteFile(filename),True If (Err And Err.Number <> 70) Then ' tolerate protection errors ErrMsg ("Could not delete: " & filename) @@ -654,7 +657,7 @@ Function dpinst_Install_VNIC(WshShell,sInstalldir) cmd = dpinstVNIC & "/S /F /SA /PATH """ & sInstalldir & _ "Drivers\qlgcvnic"" /SE /SW" - rc = WshShell.Run (cmd,0,true) + rc = WshShell.Run (cmd,WindowStyle,true) If (rc AND DPINST_INSTALLED) = 0 Then dpinst_status "qlgcvnic Install failed",cmd,rc,"dpinst_Install_VNIC" dpinst_Install_VNIC = rc @@ -673,7 +676,7 @@ Function dpinst_Install_SRP(WshShell,sInstalldir) dpinstSRP = "cmd.exe /c cd /d " & sInstalldir _ & "SRP & ..\dpinst.exe " cmd = dpinstSRP & "/S /F /SA /PATH """ & sInstalldir & "Drivers\SRP""" & " /SE /SW" - rc = WshShell.Run (cmd,0,true) + rc = WshShell.Run (cmd,WindowStyle,true) If (rc AND DPINST_INSTALLED) = 0 Then dpinst_status "SRP Install failed",cmd,rc,"dpinst_Install_SRP" dpinst_Install_SRP = rc @@ -835,7 +838,7 @@ Sub Remove_IB_Devices() If fso.FileExists(winDir & "system32\ndinstall.exe") Then cmd = "ndinstall -q -r winverbs & ndinstall -q -r ibal" - rc = WshShell.Run ("cmd.exe /c " & cmd, 0, true) + rc = WshShell.Run ("cmd.exe /c " & cmd, WindowStyle, true) End If ' WSD is not supported on XP and should NOT have been installed. @@ -844,7 +847,7 @@ Sub Remove_IB_Devices() If sVersionNT <> WindowsXP Then If fso.FileExists(sInstalldir & "installsp.exe") Then rc = WshShell.Run ("cmd.exe /c cd /d " & sInstalldir & _ - " & installsp.exe -r", 0, true) + " & installsp.exe -r", WindowStyle, true) End If End If @@ -999,10 +1002,10 @@ Sub find_remove_INF_file(WshShell,exe,LookFor) " " & cmd,,"find_remove_INF_file" found = 1 End If - Return = WshShell.Run (cmd, 0, true) + Return = WshShell.Run (cmd, WindowStyle, true) if use_dpinst then ' use devman.exe to delete all .inf referenced files - Return = WshShell.Run (cmdDM, 0, true) + Return = WshShell.Run (cmdDM, WindowStyle, true) end if ' make sure the .inf & .pnf files are removed. pfile = replace(file,".inf",".pnf") @@ -1039,10 +1042,10 @@ Sub remove_INF_file(WshShell,exe,file) "remove_INF_file" end if - Return = WshShell.Run (cmd, 0, true) + Return = WshShell.Run (cmd, WindowStyle, true) if use_dpinst then ' use devman.exe to delete all .inf referenced files - Return = WshShell.Run (cmdDM, 0, true) + Return = WshShell.Run (cmdDM, WindowStyle, true) end if ' make sure the .inf & .pnf files are removed. @@ -1221,9 +1224,11 @@ Sub Uninstall_VNIC(fso,WshShell,devices,sInstalldir) devInfo = GetDeviceInstallInfo(WshShell,sInstalldir,dt) End If ' disable instance - double quote complex device name for success. - Return = WshShell.Run (devman & "disable ""@" & dt & """", 0, true) + Return = WshShell.Run (devman & "disable ""@" & dt & """", _ + WindowStyle, true) ' Removing the Qlogic Vnic I/O Unit - Return = WshShell.Run (devman & "remove ""@" & dt & """", 0, true) + Return = WshShell.Run (devman & "remove ""@" & dt & """", _ + WindowStyle, true) End if Next @@ -1278,9 +1283,9 @@ Sub Uninstall_SRP(fso,WshShell,devices,sInstalldir) devInfo = GetDeviceInstallInfo(WshShell,sInstalldir,dt) End If ' disable the instance - Return = WshShell.Run (devmanDAAT & dt, 0, true) + Return = WshShell.Run (devmanDAAT & dt, WindowStyle, true) ' Removing SRP device - Return = WshShell.Run (devmanRMAT & dt, 0, true) + Return = WshShell.Run (devmanRMAT & dt, WindowStyle, true) ' msgbox "Uninstall_SRP() " & devmanRMAT & dt & " rc " & Return End if Next @@ -1315,8 +1320,8 @@ Sub RemoveDevice(fso,WshShell,sInstalldir,devList,DeviceTag) If IsNull(devInfo) Then devInfo = GetDeviceInstallInfo(WshShell,sInstalldir,dt) End If - Return = WshShell.Run (devmanDAAT & dt & """", 0, true) - Return = WshShell.Run (devmanRMAT & dt & """", 0, true) + Return = WshShell.Run (devmanDAAT & dt & """", WindowStyle, true) + Return = WshShell.Run (devmanRMAT & dt & """", WindowStyle, true) End if Next @@ -1353,10 +1358,10 @@ Sub Uninstall_IB_Devices(fso,WshShell,sInstalldir) End If ' stop the openSM service in case it was started. - Return = WshShell.Run ("cmd.exe /c sc.exe stop opensm", 0, true) + Return = WshShell.Run ("cmd.exe /c sc.exe stop opensm", WindowStyle, true) ' delete opensm service from registry - Return = WshShell.Run ("cmd.exe /c sc.exe delete opensm", 0, true) + Return = WshShell.Run ("cmd.exe /c sc.exe delete opensm", WindowStyle, true) ' remove HCA devices @@ -1449,18 +1454,18 @@ Sub IB_DriverCleanup() ' in livefish mode the delete didn't suceed, delete it in another way For each ID in nukem If ID <> "" Then - Return = WshShell.Run (base & ID & " /f", 0, true) + Return = WshShell.Run (base & ID & " /f", WindowStyle, true) End if Next ' Cleanup KMDF CoInstaller Driver entries. - Return = WshShell.Run (base & "Control\Wdf\Kmdf\kmdflibrary\versions\1\driverservices /v mlx4_bus /f", 0, true) - Return = WshShell.Run (base & "Control\Wdf\Kmdf\kmdflibrary\versions\1\driverservices /v winverbs /f", 0, true) - Return = WshShell.Run (base & "Control\Wdf\Kmdf\kmdflibrary\versions\1\driverservices /v winmad /f", 0, true) + Return = WshShell.Run (base & "Control\Wdf\Kmdf\kmdflibrary\versions\1\driverservices /v mlx4_bus /f", WindowStyle, true) + Return = WshShell.Run (base & "Control\Wdf\Kmdf\kmdflibrary\versions\1\driverservices /v winverbs /f", WindowStyle, true) + Return = WshShell.Run (base & "Control\Wdf\Kmdf\kmdflibrary\versions\1\driverservices /v winmad /f", WindowStyle, true) ' Not yet -' Return = WshShell.Run ("reg.exe delete HKLM\Software\Microsoft\Windows\currentVersion\DIFx\DriverStore\WinVerbs_* /f", 0, true) -' Return = WshShell.Run ("reg.exe delete HKLM\Software\Microsoft\Windows\currentVersion\DIFx\DriverStore\ipoib_* /f", 0, true) +' Return = WshShell.Run ("reg.exe delete HKLM\Software\Microsoft\Windows\currentVersion\DIFx\DriverStore\WinVerbs_* /f", WindowStyle, true) +' Return = WshShell.Run ("reg.exe delete HKLM\Software\Microsoft\Windows\currentVersion\DIFx\DriverStore\ipoib_* /f", WindowStyle, true) ' ' Remove all Local Area Connection Registry entries which were constructed @@ -1472,7 +1477,8 @@ Sub IB_DriverCleanup() For each LAC in IPOIB_LAC If LAC <> "" Then - Return = WshShell.Run ("reg.exe delete " & LAC & " /f", 0, true) + Return = WshShell.Run ("reg.exe delete " & LAC & " /f", _ + WindowStyle, true) If Err Then ShowErr End if Next @@ -1570,7 +1576,7 @@ Sub CheckDriversOK() Do While IsNull(devList) ' Wait for device IPoIB to appear as it's required for WSD/ND install. - WshShell.Run "cmd.exe /c timeout /T 2", 0, true + WshShell.Run "cmd.exe /c timeout /T 2", WindowStyle, true too_long = too_long - 1 if too_long <= 0 then ' timeout info box. @@ -1612,7 +1618,7 @@ Sub WSDEnable() If fso.FileExists(sInstalldir & "installsp.exe") Then ' install the WinSockdirect service Return = WshShell.Run ("cmd.exe /c cd /d " & sInstalldir _ - & " & installsp.exe -i", 0, true) + & " & installsp.exe -i", WindowStyle, true) End If End Sub @@ -1638,7 +1644,8 @@ Sub ND_StartMeUp() If Architecture() = "ia64" Then NDprovider = "winverbs" End If - Ret = WshShell.Run ("cmd.exe /c ndinstall -q -i " & NDprovider, 0, true) + Ret = WshShell.Run ("cmd.exe /c ndinstall -q -i " & NDprovider, _ + WindowStyle, true) If Ret Then ShowErr2("ND service provider install failed") End If @@ -1656,8 +1663,9 @@ End Sub Sub OpenSM_StartMeUp(WshShell,sInstalldir) - Return = WshShell.Run ("cmd.exe /c sc.exe config opensm start= auto",0,true) - Return = WshShell.Run ("cmd.exe /c sc.exe start opensm", 0, true) + Return = WshShell.Run ("cmd.exe /c sc.exe config opensm start= auto", _ + WindowStyle,true) + Return = WshShell.Run ("cmd.exe /c sc.exe start opensm", WindowStyle, true) Err.clear End Sub @@ -1765,7 +1773,8 @@ Sub BcastRegChanged sInstalldir = Session.Property("INSTALLDIR") On Error Resume Next - WshShell.Run "%COMSPEC% /c cd /d " & sInstalldir & " & nsc.exe", 0, true + WshShell.Run "%COMSPEC% /c cd /d " & sInstalldir & " & nsc.exe", _ + WindowStyle, true Err.clear BcastRegChanged = 0 @@ -1787,7 +1796,7 @@ Sub HammerTime sInstalldir = Session.Property("INSTALLDIR") If fso.FolderExists(sInstalldir) Then cmd = "cmd.exe /c rmdir /S /Q """ & sInstalldir & """" - rc = wshShell.Run(cmd,0,true) + rc = wshShell.Run(cmd,WindowStyle,true) End if If fso.FolderExists("C:\IBSDK") Then