Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Shutdown ... Execute before shutdown ???  (Read 2176 times)

0 Members and 1 Guest are viewing this topic.

DaveLembke

    Topic Starter


    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Shutdown ... Execute before shutdown ???
« on: May 30, 2007, 01:23:19 PM »
Hello, I am looking for a way to process a series of instructions before the Windows 2000 system shuts down. The opposite of the STARTUP feature of the Windows OS which loads items in that folder upon boot. Anyone know of any software or tweaks to do this?

I was thinking about relocating the shutdown.exe file, and compile a batch file as shutdown.exe in the place of it, which would run the instructions, then point to the actual shut down command located elsewhere when the instructions are completed....

Haven't done this yet to see if this is the trick that will work or not, but I dont see why it wouldn't...

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: Shutdown ... Execute before shutdown ???
« Reply #1 on: May 30, 2007, 02:08:53 PM »
I'm amazed this option doesn't exist in Task Manager i just checked my Win2K machine...

Found This    handy little ditty though....

Haven't tried it yet but it may do what you need...

Not sure if multiple tasks can be setup.

Let me know.
" Anyone who goes to a psychiatrist should have his head examined. "

contrex

  • Guest
Re: Shutdown ... Execute before shutdown ???
« Reply #2 on: May 30, 2007, 02:18:05 PM »
you just have to include shutdown.exe in a batch file like so

Code: [Select]
@echo off

REM code to EG empty recycle bin
REM code to do something else
REM code to do another thing
REM etc
REM Finally...
REM shutdown /? for full usage details

shutdown -s -t 01 -c "Your message here"

Save it somewhere, create a shortcut to the batch, use that instead of the one on the start menu