PDA

View Full Version : Wait for app to exit (that's getting updated)



NewsArchive
03-21-2018, 03:53 AM
I have my own built-in method for checking for software updates.

The app needs to close down before I RUN() the SB installer.

I've tried simply doing a HALT(). This is at startup so the user isn't
doing anything.

The SB installer still thinks the app is running and shows the Restart
message at the end of the install.

I do not want this.

What's the solution here? Can the installer SLEEP for a couple of seconds
at startup to give my app time to shutdown?

Tks,

Greg Berthume
C10 12799 | SQL Server 2016

NewsArchive
03-21-2018, 03:55 AM
I do not know if this would help to solve your problem, but yes, there is a
SLEEP(x) command in SB.

Its somewhere in the right-hand-side menue.

Regards,
Wolfgang Orth
www.odata.de

Please note:
From time to time it happens, that I overlook a reply to my postings.
Please don't be angry.
In case of an emergency, try to contact me via mail.

Bitte beachten:
Von Zeit zu Zeit passiert es mir, dass ich Antworten auf meine Postings übersehe.
Bitte nicht böse sein.
Im Notfall bitte Kontakt per Mail versuchen.

NewsArchive
03-21-2018, 03:55 AM
Hi Greg,

> What's the solution here? Can the installer SLEEP for a couple of seconds
> at startup to give my app time to shutdown?

When you start the SB installer, try CHAIN() I have used that in
similar situation and it works well.

Best regards,



--
Arnor Baldvinsson
Icetips Alta LLC

NewsArchive
03-21-2018, 09:55 AM
Thanks, this seems to work OK.

I forgot about CHAIN. I used to use this in AlphaBASIC back in my
AlphaMicroSystems programming days.

..RUN (compiled) were run from one to another via CHAIN.

Man that was a long time ago!

Greg Berthume

NewsArchive
03-21-2018, 09:57 AM
Greg,

You can instruct the installer to check whether the application is still
running or not. Do this is a LOOP to make sure it is really closed down.
If you get a "reboot" message at the end of the installation then the
application was still active (it replaced locked/in-use files).

See the attached screenshot. This is what we are using to check if SB10.EXE
is not active before doing an update. You can fine tune this method. For
example, if your application supports the WM_CLOSE event to shut down, you
can use the "Terminate Active Application..." script function to handle
this. Be careful when ending a process and the "Gently Close Application"
option is not enabled. In this case, if you end an application, you will
lose unsaved data. If you end (kill) a system service, some part of the
system may not function properly.

Friedrich

NewsArchive
03-21-2018, 09:57 AM
Thanks Friedrich!

CHAIN() seems to be working for now but if I run into any further issues, I
will do some SB scripting.

Greg Berthume