Results 1 to 8 of 8

Thread: Task to be performed during shutdown

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Mumbai , India
    Posts
    11

    Task to be performed during shutdown

    hi,


    I want to run an exe during the machine shutdown. How can this be done?

    Thanx
    Nilesh A Vaidya

  2. #2
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    I'd be surprised if you could.
    Shutdown closes all active programs, and kills the processes...
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    rjlohan is correct. The answer to your question is, you can't.

  4. #4
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    I'm actually curious now, as to why you would actually want to do that?
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  5. #5
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    This is a rather generic hack of a way but you could make a program with no interface that loads a form but doesn't show it. Then just leave it running so that the when windows shuts it down during its close up it'll fir the form's query unload event (and unload).

  6. #6
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    It won't work though, because the whole shutdown process is killing everything. Try it out, with notepad or something.
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

  7. #7

    Thread Starter
    New Member
    Join Date
    Jan 2002
    Location
    Mumbai , India
    Posts
    11
    Actually I wanted to run a program which will determine for how much time was windows session going on. If I start the program in background and keep it running then there are lot of chances that the user will kill that application , so if i run this application of mine just before shut down then there is very rare chances of bypassing it as i want to kepp track of the time the user uses his machine (windows application)...
    Nilesh A Vaidya

  8. #8
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    What do you mean try it out with notepad? How could I try that out with notepad?

    It would work depending on how complex a thing you want to do at system close. I have a chat app that sends some finishing messages when it gets shut off, even when the system shuts it off. I think the system allows it so much time before it forces the shut off, there must be some timeout value.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width