Announcement

Collapse
No announcement yet.

Hide entire installation and capability to debug installer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hide entire installation and capability to debug installer

    Hi !

    1. We would like to hide entire Installer when silent installation (/S) is executed.

    I've discovered that it's possible indeed to use

    Code:
    if _SilentInstall == true then
    handle = Application.GetWndHandle();
    Window.Hide(handle);
    end
    Kind of code in OnStartup or On Preload some of screens - but window still manages to flash quickly.

    Would it be possible to completely hide Installer windows, without even flashing and showing it on taskbar ?

    2. I've managed to integrate some C# code inside setup factory installer (calling it from .lua via pinvoke), and looks like working -
    but I have trouble of attaching to installer using Visual studio 2019.
    I'm running Visual studio on elevated priviledge, and typically installer crashes once I attach debugger to it.

    I was suspected that you use some sort of anti-debugging tricks, but it's also possible that VS does not like managed code type or something like this.
    I can dig up exception details if you need some.

  • #2
    > I have trouble of attaching to installer using Visual studio 2019

    meant here:
    " I have trouble of attaching debugger to installer using Visual studio 2019"

    Comment


    • #3
      Kind of code in OnStartup or On Preload some of screens - but window still manages to flash quickly.
      No code in On Preload is executed when _SilentInstall is true, as no screens are shown / loaded. Only code in these event scripts will be executed:
      On Startup
      On Pre Install / On Pre Uninstall
      On Post Install / On Post Uninstall
      On Shutdown

      Would it be possible to completely hide Installer windows, without even flashing and showing it on taskbar ?
      Setup Factory will not show screens while silent, but it will be visible on the taskbar while running until hiding the icon with the corresponding setting.

      Click image for larger version  Name:	SCRN-2020-10-05-02.png Views:	0 Size:	24.2 KB ID:	305585

      Ulrich

      Comment


      • #4
        1. What I've briefly tested - that option indeed hides taskbar icon, but it affects also normal installation.

        I would prefer that:

        install.exe => show taskbar icon
        install.exe /S => hide taskbar icon

        Is it possible to perform same thing at the run-time - e.g. via lua scripting ?


        2. Another issue - is that I still cannot completely hide taskbar appearance - I've noticed that we do perform also automatic uninstall and suspect that pops up as a taskbar window.
        So uninstall taskbar window cannot be hidden ?

        3. What about attaching using Visual studio debugger ?

        Comment


        • #5
          Is it possible to perform same thing at the run-time - e.g. via lua scripting ?
          Not directly using a global variable, but perhaps with a call to Shell_NotifyIcon() via plugin or DLL.CallFunction().

          So uninstall taskbar window cannot be hidden ?
          The project setting defines the visibility of the installer runtime only. If you can make the aforementioned call working, then it should apply to both installer and uninstaller runtimes.

          What about attaching using Visual studio debugger ?
          I can offer no information on that matter.

          Ulrich
          Last edited by Ulrich; 10-06-2020, 07:24 AM.

          Comment


          • #6
            Is taskbar hiding possible to raise as a new requirement to Setup factory, and if it will be raised - when that could be scheduled / implemented ?

            Comment


            • #7
              I guess preferred implementation way could be that it's either controlled by scripting and / or automatically hidden when silent flag is in use (/S).

              Comment


              • #8
                I have very little expectation that something like this would be implemented in the product, as there is no demand for it. And as I hinted in my previous reply, you can resolve this with an extension. Here is a sample I just built for demonstration purposes: https://www.screencast.com/t/ZUYJJ8ZGeJ5

                Ulrich

                Comment


                • #9
                  Nice. I've hit reference on this SDK couple of times, but suspected that it's not valid anymore (as could not find it in easy accessible place).

                  This can be done also C# with pinvoke from lua scripts - will work as well as C++ SDK.

                  What I'm afraid of - is that flashing will be still present, as it's up to window creator is to set correct window style. Maybe will try it later on.

                  (Here is mentioned that need to modify window style, not Shell_NotifyIcon: https://forums.codeguru.com/showthre...con-in-TaskBar )

                  I still think this is a bug of installer itself, flashing window should not appear if silent argument is used.

                  Comment


                  • #10
                    The only thing I can see flashing is the icon on the taskbar. If I start a setup, which was enabled for silent operation in the project settings, with the /S parameter at the command prompt, I do not see any screen appearing on the screen, even for a fraction of a second.

                    Ulrich

                    Comment

                    Working...
                    X
                    😀
                    🥰
                    🤢
                    😎
                    😡
                    👍
                    👎