<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">


<META content="MSHTML 6.00.2462.0" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=774411008-12072001><FONT face=Arial color=#0000ff size=2>When 
Windows shutsdown by ExitWindows() or by ExitWindowsEx() it's send 
CTRL_SHUTDOWN_EVENT messages to processes... as far I remember, you should refer 
to Win32 SDK</FONT></SPAN></DIV>
<DIV><SPAN class=774411008-12072001><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=774411008-12072001><FONT face=Arial color=#0000ff size=2>I 
think you should write some small process monitoring this message and then 
quickly execute anything you want...</FONT></SPAN></DIV>
<DIV><SPAN class=774411008-12072001><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=774411008-12072001><FONT face=Arial color=#0000ff 
size=2>regards, Pavel Kanzelsberger</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Lee, John 
  [mailto:LeeJ@logica.com]<BR><B>Sent:</B> Wednesday, July 11, 2001 9:15 
  PM<BR><B>To:</B> 'fpc-pascal@deadlock.et.tudelft.nl'<BR><B>Subject:</B> 
  [fpc-pascal]shutting down win9x<BR><BR></FONT></DIV>
  <DIV><SPAN class=770351019-11072001><FONT face=Arial color=#0000ff size=2>Is 
  it possible automatically to run a fpc (or other) program when one clicks on 
  the Start/Shut Down menu on the win9x desktop, before windoze start its 
  shutdown sequence? How? </FONT></SPAN></DIV>
  <DIV><SPAN class=770351019-11072001><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=770351019-11072001><FONT face=Arial color=#0000ff size=2>Does 
  windoze look somewhere for a bat file called shutdown.bat ot 
  whatever? Where? TIA for any info - think I should probably know 
  this!</FONT></SPAN></DIV></BLOCKQUOTE></BODY></HTML>