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
Printable View
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
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
Hi Friedrich
So C10 RUN() would use ShellExecute - correct?
Cheers
Andre
Hi Andre,
>
> So C10 RUN() would use ShellExecute - correct?
>
Yes, as far as I know, ShellExecuteEx.
Friedrich
Thanks - good to know.
Andre Labuschagne
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
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
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
....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
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