Jump to content
ur

Feature selection in Installation

Recommended Posts

ur

We are trying to automate the installation testing before sending to end users, our product.

For Silent Installation, we have completed this part.

But for GUI, the default installation is completed by sending the keys based on the window.

But for GUI custom installation, we are struck.

How to enable or disable features in the below screen using GUI automation.?

DMr9.7_16 Sept.png

Share this post


Link to post
Share on other sites
Subz

It depends on how far you want to automate, you can use the _GuiCtrlTreeView functions or Control functions to select different parts of the tree and use "{Space}" to open the sub information and use "{UP}/{DOWN}" to select the feature state.  Personally I would place the feature states in the command line, so its pre-configured before you get to the Custom setup page.

Share this post


Link to post
Share on other sites
ur

Hi @Subz

I tried to change the feature selection through commandline.

"D:\setup.exe" /V"ADDLOCAL=ALL"

The above installation will select all the features, so one part of install testing is fullfilled.

But if I want to enable some particular features.

"D:\setup.exe" /V"ADDLOCAL=MartUpgrade"

What I expected was MartUpgrade will be enabled, but along with that it is disabling all other features.

Is there any way, the default selection will be there as it is and extra features passed should be enabled?

Share this post


Link to post
Share on other sites
ur

This is the comments I got from Flexera support team:

 

Unfortunately with InstallShield Express there is no built in functionality to enable one feature like you are describing from the command line. You can pass all of the features that you wish to install with ADDLOCAL (ex: ADDLOCAL=f1,f2,f3,f4) as that property dictates which features will be installed locally.

ADDLOCAL property:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa367536(v=vs.85).aspx

With InstallShield Professional and Premier you would have the ability to set an INSTALLLEVEL for the features and assign a condition to those features to change their install level. When doing this you could pass a property from the command line which would make the feature condition true and enable the specific feature.

Share this post


Link to post
Share on other sites
Subz

Did you try the Remove property?

Share this post


Link to post
Share on other sites
ur

Remove property also overrides the default list and we need to mention the values again.

But for this particular application, REMOVE property is feasible as I need to give only 5 features to the REMOVE property.

Thanks @Subz

Share this post


Link to post
Share on other sites
Subz

You could also modify the msi or create an MST so that it's pre-configured.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • kcvinu
      By kcvinu
      Hi all,
      I have a button created with _GUICtrlButton_Create function. I know that this function returns a handle of button instead of an ID. So i have obtain control ID by calling _WinAPI_GetDlgCtrlID function. After that i have tried the GUICtrlSetBkColor function. But it didnt worked. Any suggestions will be appreciated. Thanks in advance. 
      Note : - The window which carries this button is not created with native gui create function. Instead, it is created with CreateWindowEx api function.
    • kcvinu
      By kcvinu
      Hi all,
      I am playing with _GUICtrlButton_Create function. How can i change this button's (or the entire form's) font ?. The in-built GUICtrlSetFont function is not working even when i convert the control handle to control ID with _WinAPI_GetDlgCtrlID ( ) function.  Do i need to use CreateFont api finction and send WM_SETFONT message ? Or is there any other easy and safe ways to do this ?. Thanks in advance.
      Note : This window is created by CreateWindowEx function, not by GUICreate function. 
    • Jake_s
      By Jake_s
      Hi All, 
       
      I am a begginer in auto it. I am trying to build simple gui that will show me if for example notepad.exe process is currently running on the system. I have built something like this, but when I execute it shows me message boxes, but I want the results to show in gui. If you can help me start with this.
       
      Thanks
       
        #include <MsgBoxConstants.au3>
      #include <GUIConstantsEx.au3>

      ActiveProcess()

      Func ActiveProcess()
      GUICreate("Act")
               ProcessExists("wuauclt.exe")

             If ProcessExists("wuauclt.exe") Then
       MsgBox($MB_SYSTEMMODAL, "", "Windows Upates are running")
           Else
       MsgBox($MB_SYSTEMMODAL, "", "Windows Updates are not running")
       EndIf
         ;Notepad

               ProcessExists("notepad.exe")

               If ProcessExists("notepad.exe") Then
      MsgBox($MB_SYSTEMMODAL, "", "Notepad is running")
              Else
      MsgBox($MB_SYSTEMMODAL, "", "Notepad is not running")
      EndIf  
       
    • corz
      By corz
      This is a magnifier-color-picker thing mostly based on some code I found on Stack Overflow, of all places. At least all the clever bits are from there. 
      I'd love to use this code inside an app I'm working on. But it has an issue. The first time the mag pops up it works perfectly, but the second and subsequent times, it's a boring grey square. 
      One of you smart dudes will probably look at this and go, "Aha!", but I'm stumped.
      #include <WindowsConstants.au3> #include <WinAPI.au3> #include <StaticConstants.au3> MagWindow() MagWindow() ; Magnifier-Color-Picker.. ; Props to McBarby for the cross-hairs. func MagWindow() global $iMagZoom = 5 global $iMagWidth = Ceiling(100/$iMagZoom) global $iMagHeight = Ceiling(100/$iMagZoom) global $hDCDesk, $hDCZoom, $hPen global $hUser32 = DllOpen("user32.dll") global $hGDI32 = DllOpen("gdi32.dll") global $pixel_color, $mag_open = false local $mX, $mY global $hCross = GUICreate('', 48, 48, -1, -1, $WS_POPUP, $WS_EX_TOPMOST) WinSetTrans($hCross, '', 0) GUISetCursor(3, 1, $hCross) global $hZoom = GUICreate("MagPicker", $iMagWidth * $iMagZoom, $iMagHeight * $iMagZoom, _ MouseGetPos(0), MouseGetPos(1), $WS_POPUP+$WS_BORDER, $WS_EX_TOPMOST) global $mag_label = GUICtrlCreateLabel("placehold", (($iMagHeight * $iMagZoom)/2)+2, ($iMagHeight * $iMagZoom) - 13, _ (($iMagHeight * $iMagZoom)/2)-3, 12, $SS_RIGHT) ; put this after the GUICreate()s so that it will not error on startup with mouse already moving. (now trapped! but we will leave them here.) global $__hMouseProc = DllCallbackRegister("_MouseProc", "long", "int;wparam;lparam") global $__hHook = _WinAPI_SetWindowsHookEx($WH_MOUSE_LL, DllCallbackGetPtr($__hMouseProc), _WinAPI_GetModuleHandle(0)) GUISetState(@SW_SHOW, $hCross) GUISetState(@SW_SHOW, $hZoom) $mag_open = true ; once at start, then from the mouse-callback-function.. _Magnify() while $mag_open Sleep(50) $mX = MouseGetPos(0) $mY = MouseGetPos(1) $pixel_color = Hex(PixelGetColor($mX, $mY), 6) GUICtrlSetData ($mag_label, $pixel_color) wend GUIDelete($hZoom) GUIDelete($hCross) ReleaseHooks() endfunc func _Magnify($_iX=-1, $_iY=-1) local Static $fInit = true if $fInit then $fInit = False $hDCDesk = (DLLCall($hUser32, "int", "GetDC", "hwnd", 0))[0] $hDCZoom = (DLLCall($hUser32, "int", "GetDC", "hwnd", $hZoom))[0] $hPen = (DLLCall($hGDI32, "int", "CreatePen", "int", 0, "int", 3, "int", 0x008b9094))[0] ; 0=PS_SOLID, dark-blue (0x00BBGGRR) DLLCall($hGDI32, "int", "SelectObject", "int", $hDCZoom, "hwnd", $hPen) $_iX = MouseGetPos(0) $_iY = MouseGetPos(1) endif local $iW = $iMagWidth * $iMagZoom, $iH = $iMagHeight * $iMagZoom if not @error then DLLCall($hGDI32, "int", "StretchBlt", "int", $hDCZoom, "int", _ 0, "int", 0, "int", $iW, "int", $iH, "int", $hDCDesk, "int", _ $_iX - $iMagWidth/2, "int", $_iY - $iMagHeight/2, "int", $iMagWidth ,"int", $iMagHeight, _ "long", $SRCCOPY) ; draw the crosshair (start x, start y, end x, end y) _GDI32_DrawLine($hDCZoom, ($iW/2)-2, $iH/8, ($iW/2)-2, 4*($iH/8)-6, $hGDI32) ; vertical top _GDI32_DrawLine($hDCZoom, ($iW/2)-2, 5*($iH/8)-10, ($iW/2)-2, 7*($iH/8), $hGDI32) ; vertical bottom _GDI32_DrawLine($hDCZoom, $iW/8, ($iH/2)-2, (3*($iW/8))+6, ($iH/2)-2, $hGDI32) ; horizontal left _GDI32_DrawLine($hDCZoom, 4*($iW/8)+3, ($iH/2)-2, 7*($iW/8), ($iH/2)-2, $hGDI32) ; horizontal right endif endfunc func _GDI32_DrawLine(ByRef $_hDC, $_iX0, $i_Y0, $_iX1, $i_Y1, $_hDll=-1) If $_hDll = -1 then $_hDll = "gdi32.dll" Local $tCurrent = DllStructCreate("struct; long X;long Y; endstruct") DllCall($_hDll, "int", "MoveToEx", "int", $_hDC, "int", $_iX0, "int", $i_Y0, "ptr", DllStructGetPtr($tCurrent)) DllCall($_hDll, "int", "LineTo", "int", $_hDC, "int", $_iX1, "int", $i_Y1) return $tCurrent endfunc func _MouseProc($_nCode, $_wParam, $_lParam) local $tMSLLHOOKSTRUCT = DllStructCreate("struct; long X;long Y; endstruct; " & _ "DWORD mouseData; DWORD flags; DWORD time; ULONG_PTR dwExtraInfo;endstruct", $_lParam) if $_nCode < 0 Then Return _WinAPI_CallNextHookEx($__hHook, $_nCode, $_wParam, $_lParam) local $iX = $tMSLLHOOKSTRUCT.X, $iY = $tMSLLHOOKSTRUCT.Y switch $_wParam case $WM_LBUTTONDOWN CloseMag() case $WM_MOUSEMOVE if not $mag_open then return WinMove($hCross, "", $iX -24, $iY -24) Local $iXz = ($iX +24 + $iMagWidth*$iMagZoom > @DesktopWidth) ? $iX -(24 + $iMagWidth*$iMagZoom) : $iX +24 Local $iYz = ($iY +24 + $iMagHeight*$iMagZoom > @DesktopHeight) ? $iY -(24 + $iMagHeight*$iMagZoom) : $iY +24 WinMove($hZoom, "", $iXz + $iMagWidth/2, $iYz) _Magnify($iX, $iY) endswitch return _WinAPI_CallNextHookEx($__hHook, $_nCode, $_wParam, $_lParam) endfunc func ReleaseHooks() DLLCall($hUser32, "int", "ReleaseDC", "int", $hDCZoom, "hwnd", $hPen) DLLCall($hUser32, "int", "ReleaseDC", "int", $hDCDesk, "hwnd", 0) DLLCall($hUser32, "int", "ReleaseDC", "int", $hDCZoom, "hwnd", 0) DllClose($hUser32) DllClose($hGDI32) _WinAPI_UnhookWindowsHookEx($__hHook) DllCallbackFree($__hMouseProc) endfunc func CloseMag() ; called by mouse left click $mag_open = false endfunc  
      Thanks for any and all insights!
      ;o) Cor
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.