PDA

View Full Version : Webupdate, how to call WUPDATE.EXE



NewsArchive
12-15-2015, 09:51 AM
Hello,

Can anyone share the latest strategies for calling WUPDATE.exe from
within a Clarion App?

If I call WUPDATE from within Clarion, the application is still running
when the new install runs. Am I supposed to close the Clarion
application after calling the WUPDATE? Because if not, the install can't
overwrite the application because it's already running.

Should I use RUN('wupdate.exe',1) or some other way of calling it?

Can anyone give a code example in Clarion for the actual calls to WUPDATE?

Thank you.



--
Carlos A. Rodriguez Rodriguez System Analyst/Programmer

NewsArchive
12-15-2015, 09:52 AM
Carlos,

I would suggest to use wucheck.exe (because it is an "asInvoker" manifested
client and runs non-elevated by default). No elevation prompt at all on
UAC-aware operating systems.

You can silently check for updates. If an update is available, call
wucheck.exe again and let it download and install the update.

Friedrich

NewsArchive
12-15-2015, 09:53 AM
Friedrich,

Thank you for the reply.

So I will first call WUCHECK with /C, and if update available, call
WUCHECK with /S /Q. Is RUN() ok for this?

Now the question is, when (or if) do I close the Clarion application?
How do I restart it after?

Thank you again.

--
Carlos A. Rodriguez Rodriguez System Analyst/Programmer

NewsArchive
12-16-2015, 04:41 AM
Hi Friedrich,

Is there a general overview, somewhere, of how the web update system is meant
to work, what is required in the app, on a website etc.

I'm in the same boat as Carlos, using SB for the first time and trying to get
my head around how WU works, and I read in the documentation...

"2. Create a Web Update project for an existing web update enabled application
by choosing New from the
File menu. Select Web Update Project and the New Project dialog box appears."

But there is no explanation of what a "web update enabled application" is, so I
don't know where to start?

Liam

NewsArchive
12-16-2015, 04:42 AM
Hi Liam,

You only need a simple HTTP 1.x compliant web server. Even the cheapest
ones will work.

You make an application "Web Update ready" by installing the Web Update
client (Web Deployment -> Live Application Update -> mark the "Enable Web
Update" and "Install Web Update Client" check boxes). After the initial
installation, your application is Web Update ready.

When your first new build becomes available, you create a new Web Update
project:

http://www.lindersoft.com/forums/showthread.php?9459

That's it :-)

Friedrich

NewsArchive
12-16-2015, 04:43 AM
Hi Carlos,

> So I will first call WUCHECK with /C, and if update available, call
> WUCHECK with /S /Q. Is RUN() ok for this?
>
> Now the question is, when (or if) do I close the Clarion application?
> How do I restart it after?

What I do is use CHAIN to run the update exe. That way your program
shuts down as it calls the update. I don't restart my programs after
the install as they are manifested asInvoker where the installer needs
to be RequireAdministrator. I think Friedrich has an option to run
non-elevated programs from the installer, but I haven't experimented
with it.

Best regards,

--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
12-16-2015, 09:36 AM
Friedrich,

I believe the question was more about the Clarion side of things. The
link you shared only talks about the SB configuration, but there is very
little out there illustrating how to enable it from within Clarion.

Edmond Sarussi

NewsArchive
12-17-2015, 05:45 AM
Carlos,

> So I will first call WUCHECK with /C, and if update available, call
> WUCHECK with /S /Q. Is RUN() ok for this?

I am using /C /S to check for updates and if it returns "1" (update
available) then I call it again with the /S command line switch to download
and install the update. Our update itself is a silent package so I do not
need the /Q switch.

I am not using RUN() but the ShellExecuteEx() Windows API. But RUN() is
okay.

> Now the question is, when (or if) do I close the Clarion application? How
> do I restart it after?

You can detect an active instance of your application from the "web
installer update package". To be on the safe side, you should ask the user
to terminate the app before the installer handles the update (to avoid a
Windows restart request). At the end of the update process, you can restart
it with the "Run Program..." script function (don't forget to enable the
"Launch non-elevated under UAC" option).

You can do the following (optional):

- At your application startup, let the wucheck.exe client check if an update
is available. If this is the case, display a message and let the user
decide what to do ("Install Update? Yes/No").

- Add menu items or a toolbar button to let the user check for updates
programatically.

If an update is available, wucheck.exe can download and execute the web
installer update package. This installer does all the real work (detect
active instances of your app, check if the user has a valid maintenance key
or serial number, install the updates, restart the application, etc.).

Does this help?

Friedrich

NewsArchive
12-17-2015, 05:46 AM
Edmond,

> I believe the question was more about the Clarion side of things. The link
> you shared only talks about the SB configuration, but there is
> very little out there illustrating how to enable it from within Clarion.

Yes, because there is only a RUN() command or ShellExecuteEx() Windows API
call required <g>.

Just call (from your Clarion app) "wucheck.exe" with the /C /S command line
switches to check for updates and if it returns "1" (update available) then
call it again with the /S command line switch to download and install the
update.

Friedrich