Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Eureka! I have found it!

  1. #1

    Default Eureka! I have found it!

    I am surprised no-one has picked this up before, running (using the RUN
    command) an installer from within a CW app!

    The option "Remove Installer after Successful Installation" is what causes
    the crash. Once unchecked, RUN runs just fine!

    Sim

  2. #2

    Default Re: Eureka! I have found it!

    Sim,

    > I am surprised no-one has picked this up before, running (using the RUN
    > command) an installer from within a CW app!

    Well, I am not surprised at all <g>.

    You 'LOOP NEED END' an up-to-date installation system (and a code-signing
    certificate) for modern operating systems. There is absolutely no way
    around it. And if you are using an outdated development environment, you
    have to replace incompatible commands with equivalents, e.g. RUN() with
    ShellExecute(Ex).

    And btw, this Clarion RUN() CreateProcess issue has been discussed years
    ago! IIRC, in 2007 or 2008.

    > The option "Remove Installer after Successful Installation" is what causes
    > the crash. Once unchecked, RUN runs just fine!

    Because this installer app is *NOT* Windows 7 nor Windows 8, 8.1, Windows
    10, etc. compliant. And on top of this, not code-signed. Your old Clarion
    environment uses the CreateProcess() Windows API in the RUN action and this
    does not work as expected if you try to start an application which requests
    administrator execution level privileges from a non-elevated running
    application.

    It's not the "Remove Installer after Successful Installation" option per-se
    that causes it. The combination of RUN() and not-code-signed and the
    application self-destruct mechanism brings "explorer.exe" down.

    To cut a long story short, using completely outdated development software on
    modern operating systems is a very dangerous plan with unknown consequences.

    So, for the record, what is described here is only a problem if you are
    using an outdated, non-code-signed installer (e.g. SetupBuilder 6 from 2008)
    and an old Clarion development environment (where the RUN action makes use
    of CreateProcess instead of ShellExecuteEx) on a modern Windows operating
    system (e.g. Windows 7 and later).

    Friedrich

  3. #3

    Default Re: Eureka! I have found it!

    Hi Friedrich

    So C10 RUN() would use ShellExecute - correct?

    Cheers
    Andre

  4. #4

    Default Re: Eureka! I have found it!

    Hi Andre,

    >
    > So C10 RUN() would use ShellExecute - correct?
    >

    Yes, as far as I know, ShellExecuteEx.

    Friedrich

  5. #5

    Default Re: Eureka! I have found it!

    Thanks - good to know.

    Andre Labuschagne

  6. #6

    Default Re: Eureka! I have found it!

    Hi Friedrich,

    See attached image (if appears as 'part1' just Save As
    'CreateProcess12104.PNG') nothing in EXE except

    run('c:\windows\notepad.exe')

    with Clarion 10 latest build all APIs logged using API Monitor -
    ShellExecute(Ex) is not listed - but CreateProcessA is used.

    Tried with/without manifest requesting Administrator - same result.

    Graham
    Attached Images Attached Images  

  7. #7

    Default Re: Eureka! I have found it!

    Hi Graham,

    > See attached image (if appears as 'part1' just Save As
    > 'CreateProcess12104.PNG') nothing in EXE except
    >
    > run('c:\windows\notepad.exe')
    >
    > with Clarion 10 latest build all APIs logged using API Monitor -
    > ShellExecute(Ex) is not listed - but CreateProcessA is used.
    >
    > Tried with/without manifest requesting Administrator - same result.

    That's interesting. What happens when you RUN() from an "asInvoker"
    manifested EXE a "requireAdministrator" manifested EXE? Does it launch or
    do you see an Error 740? Do you see the same CreateProcessA API logged
    using API Monitor?

    Friedrich

  8. #8

    Default Re: Eureka! I have found it!

    Hi Friedrich,

    All seems to be the same whatever the .manifest contains, no errors.
    I even tried using RUN with an actual CCleaner setup.exe file
    It still used CreateProcessA .

    Graham

  9. #9

    Default Re: Eureka! I have found it!

    ....without a manifest at all, and RUN(ning) CCSetu509.exe it calls
    CreateProcessA as usual and then I get the UAC elevation request
    because CCleaner setup requires it.

    Graham

  10. #10

    Default Re: Eureka! I have found it!

    Hi Graham,

    > ....without a manifest at all, and RUN(ning) CCSetu509.exe it calls
    > CreateProcessA as usual and then I get the UAC elevation request because
    > CCleaner setup requires it.

    Yes, but the CreateProcessA API can't start (from an "asInvoker" manifested
    and non-elevated running executable) a "requireAdministrator" manifested
    EXE. This is impossible. CreateProcessA will always fail with error code
    740 or "The requested operation requires elevation" in this case. Only
    ShellExecute(Ex) can handle it.

    Friedrich

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •