Replacing "Shutdown" Action Button in LaunchPad 
Author Message
 Replacing "Shutdown" Action Button in LaunchPad

Hi,

We are trying to replace the "Shutdown" Action button in the LaunchPad
with our customized shutdown procedure.  We have not been successful at
accomplishing this tough and were wondering if anyone out there has
tackled this problem.

We are running under OS/2 Warp and OS/2 Warp Connect.

F.Y.I.
We have tried calling the SysSetObjectData function to turn off the
action buttons but this doesn't seem to work.  The Action Buttons are
covered by the other icons in the LauchPad but still exist and can be
acitivated by a careful click in the LaunchPad window.  Even worse is
that we also get an extra icon created in the LaunchPad for the A drive.
The A drive icon was the first icon in the LaunchPad window.

Thanks in advance for any and all help!

Michael P. Pelletier



Fri, 02 Apr 1999 03:00:00 GMT  
 Replacing "Shutdown" Action Button in LaunchPad

Quote:


> : Hi,

> : We are trying to replace the "Shutdown" Action button in the LaunchPad
> : with our customized shutdown procedure.  We have not been successful at
> : accomplishing this tough and were wondering if anyone out there has
> : tackled this problem.

> Shutdown causes every open application to receive a WM_QUIT (or something
> like that) message.

> Why not use that for your customized shutdown procedure?

Because we are trying to gracefully stop our database and other programs
that are not developed by us and are not equipped to handle a WM_QUIT.


Sat, 03 Apr 1999 03:00:00 GMT  
 Replacing "Shutdown" Action Button in LaunchPad


:
:

:

: > : Hi,
: >
: > : We are trying to replace the "Shutdown" Action button in the LaunchPad
: > : with our customized shutdown procedure.  We have not been successful at
: > : accomplishing this tough and were wondering if anyone out there has
: > : tackled this problem.
: >
: > Shutdown causes every open application to receive a WM_QUIT (or something
: > like that) message.
: >
: > Why not use that for your customized shutdown procedure?
: >
: >
:
: Because we are trying to gracefully stop our database and other programs
: that are not developed by us and are not equipped to handle a WM_QUIT.
:



Sat, 03 Apr 1999 03:00:00 GMT  
 Replacing "Shutdown" Action Button in LaunchPad


Quote:
>> Shutdown causes every open application to receive a WM_QUIT (or something
>> like that) message.

>> Why not use that for your customized shutdown procedure?

>Because we are trying to gracefully stop our database and other programs
>that are not developed by us and are not equipped to handle a WM_QUIT.

Yes, but you could write a program that sits there and does NOTHING unless it
receives a WM_QUIT. If it has no interface, it the only time it will shutdown is
when it receives a WM_QUIT. You then put in the code that will shutdown your
external database program properly (or not at all) or whatever you want to do.

The basic idea is to be able to know WHEN shutdown has been called - not
necessarily replace it...

*************************************************

United Parcel Service               I.S. Maryland

*** My views are my own and nobody else's,    ***
*** and certainly not the views of my company!***
*************************************************



Sun, 04 Apr 1999 03:00:00 GMT  
 Replacing "Shutdown" Action Button in LaunchPad


Schlegel)15 Oct 1996 20:55:16 GMT writes:
:>

:>:
:>:

:>:

:>: > : Hi,
:>: >
:>: > : We are trying to replace the "Shutdown" Action button in the LaunchPad
:>: > : with our customized shutdown procedure.  We have not been successful at
:>: > : accomplishing this tough and were wondering if anyone out there has
:>: > : tackled this problem.
[snip]
:>: Because we are trying to gracefully stop our database and other programs
:>: that are not developed by us and are not equipped to handle a WM_QUIT.
:>:

I think that there is somewhere (Hobbes or EWS I don't remind) a  utility
called
ONSHUTDOWN that allows you to specify a program to be started when a Shutdown
is
initiated. I've not tested it but it could be a solution for your problem :
instead of starting something else when asking for a shutdown, let something
else
happen when a shutdown is started...

Worth two cents, I don't know but I hope it will help.

Jean-Pierre



Mon, 05 Apr 1999 03:00:00 GMT  
 Replacing "Shutdown" Action Button in LaunchPad


Quote:


> >> Shutdown causes every open application to receive a WM_QUIT (or something
> >> like that) message.

> >> Why not use that for your customized shutdown procedure?

> >Because we are trying to gracefully stop our database and other programs
> >that are not developed by us and are not equipped to handle a WM_QUIT.

> Yes, but you could write a program that sits there and does NOTHING unless it
> receives a WM_QUIT. If it has no interface, it the only time it will shutdown is
> when it receives a WM_QUIT. You then put in the code that will shutdown your
> external database program properly (or not at all) or whatever you want to do.

If the database and other programs are text-mode programs running in
windows or full-screen, the WPS tries to close these before it starts to
close the PM programs. This doesn't apply to DETACHed programs. So if
WM_QUIT only goes to PM programs, and the database and other programs
aren't PM programs, your suggestion probably won't help.

An unreliable workaround would be to create an object for the customized
shutdown procedure, shadow it on the launchpad, and instruct users to
use this button before the Shutdown button - or instead of it if the
procedure includes calling/starting SHUTDOWN.EXE in the end.
(SHUTDOWN.EXE appears to do the same as the WPS Shutdown procedure.)

If the customized shutdown procedure invokes SHUTDOWN.EXE itself, but is
another text mode program, it will be necessary to start SHUTDOWN.EXE
from a DETACHed program, which waits a few seconds before doing that, to
give the shutdown procedure program some time to end. Think of a
customized_shutdown.cmd, whose last action before exiting is to DETACH a
wait_shutdown.cmd, which waits a few seconds and then calls
SHUTDOWN.EXE.

Hope this helps!

Horst



Tue, 06 Apr 1999 03:00:00 GMT  
 Replacing "Shutdown" Action Button in LaunchPad


Quote:
>Hi,

>We are trying to replace the "Shutdown" Action button in the LaunchPad
>with our customized shutdown procedure.  We have not been successful at
>accomplishing this tough and were wondering if anyone out there has
>tackled this problem.

>We are running under OS/2 Warp and OS/2 Warp Connect.

>F.Y.I.
>We have tried calling the SysSetObjectData function to turn off the
>action buttons but this doesn't seem to work.  The Action Buttons are
>covered by the other icons in the LauchPad but still exist and can be
>acitivated by a careful click in the LaunchPad window.  Even worse is
>that we also get an extra icon created in the LaunchPad for the A drive.
>The A drive icon was the first icon in the LaunchPad window.

>Thanks in advance for any and all help!

>Michael P. Pelletier

Hi Michael,
Last year I had to develop the similar feature for our production
environment. Let me warn you, that you will never be able to write
a so called "customized" shutdown, since IBM has specific hooks in
how they flush the buffers during graceful shutdown process.

However, these are the tricks I used for my needs:

(1) Initially bring down your OS/2 apps, specifically db/2 related, with its
    own shutdown features and check for successful return codes.
(2) Perform PSTAT and parse PID PPID values for each app.
(3) Once you have all the PID in the stem array, start killing them using
    utilities like "killem", "killpid" .... with decimal value of the PID/PPID
(4) DOS windows you do not have to worry about.
(5) Finally, when all apps are stopped gracefully and the sessions are killed
    the remaining piece is the desktop.
(6) This is where you will use SHUTDOWN.EXE program to bring up the final
     pop-up to close the desktop.

Note: SHUTDOWN.EXE was not written by IBM. It may be available from
their ftp site or try ftp.leo.org/pub/os/os2/.........>

Hope this help.
Hasmukh Daji



Wed, 07 Apr 1999 03:00:00 GMT  
 Replacing "Shutdown" Action Button in LaunchPad


Quote:

> Note: SHUTDOWN.EXE was not written by IBM.

Perhaps, but it's already present in OS/2 Warp Version 3 (with FixPak
17, perhaps earlier). On the machines here, it's located in the
\OS2\INSTALL directory on the boot drive, and I'm fairly sure I haven't
put/allowed any third-party stuff there.

Horst



Fri, 09 Apr 1999 03:00:00 GMT  
 Replacing "Shutdown" Action Button in LaunchPad



Quote:


> > Note: SHUTDOWN.EXE was not written by IBM.

> Perhaps, but it's already present in OS/2 Warp Version 3 (with FixPak
> 17, perhaps earlier). On the machines here, it's located in the
> \OS2\INSTALL directory on the boot drive, and I'm fairly sure I haven't
> put/allowed any third-party stuff there.

> Horst

You are absolutely right in what you see in the directory. But the actual
file was not developed by IBM themselves... that's what I meant by third
party executable.


Mon, 12 Apr 1999 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. replace string AFTER "size","initial", "next"

2. Help with "Action"

3. Template Question on "Action Tab"

4. "Iterating Several Actions"

5. Bryan Schofield's "Action" package

6. awk "search and replace"

7. What replaces "EXIT"?

8. Rookie question: "Replace"-command?

9. Replacing "\"s using re.sub

10. string.join(["Tk 4.2p2", "Python 1.4", "Win32", "free"], "for")

11. Replace with regular expressions "except if..."

12. How to make key focus on the "Replace" button of the open/create/replace file in labview

 

 
Powered by phpBB® Forum Software