]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[OFED/WIX] replace numeric value indicating Window Style with a constant 'WindowStyle'.
authorStan Smith <stan.smith@intel.com>
Thu, 15 Apr 2010 21:31:55 +0000 (21:31 +0000)
committerStan Smith <stan.smith@intel.com>
Thu, 15 Apr 2010 21:31:55 +0000 (21:31 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@2789 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/OFED/WIX/CustomActions.vbs

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