Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shutting down and Cleaning Up.

Windows 98 - Shutting Down.

Shutting down and Cleaning Up.

by  jnicks  Posted    (Edited  )
PaulLovey's Tek-Tip FAQ, Windows 98 will not shutdown shows a better way to shutdown windows and points you to the MS article. Please read or print it.

If you are going to use a command line shutdown by putting

Code:
  C:\WINDOWS\RUNDLL.EXE USER.EXE,EXITWINDOWS

in a batch file and then making a link to it, you can add greatly to the capabilities of Shutdown.

Shutdown is the ideal time to clean up the system, things like DeFrag, ScanDisk are often ignored by users as they take too much time. But if you are finished with the computer for awhile it is the ideal time to let the system run a few diagnostics.

We could add a line to the batch file to run Defrag,

[ul]
Code:
  Start /W Defrag /Full /NoPrompt 
  C:\WINDOWS\RUNDLL.EXE USER.EXE,EXITWINDOWS
[/ul]

The Start /W tells Window to start Defrag and not to come back to the batch file until it Defrag is completed. /W stands for /Wait.

If we did not use Start /W the batch file would start defrag and immediately start the shutdown, ending defrag.

-------------------------------------

Along with Defrag, we could
- Backup new or modified user files.
- Shutdown attached remote drive access
- Take a registry backup
- Run Scandisk (see note, below)
- Run a full anti-virus scan
- Delete the cache areas from the browsers.
- Clean up Temp

ShutDown processing can even select tasks to do by day of the week, or run a DOS task as is done in Windows Installs. This requires extensions to what Microsoft supplies.

Think of ShutDown as an opportunity to get things done that the user does ot generally have time for, and you may agree that shutdown processing is a valuable time.

------------------------------------

Note on ScanDisk

Scandisk comes in two flavors, the old DOS ScanDisk names ScanDisk.EXE and the 32 bit wrapper for it, ScanDskW.EXE in Windows.

To have our Start command wait, we need to use the 32 bit version.

DO: Start /W ScanDskw /(switches)
DO NOT: Start /W SbanDisk

------------------------------------------
Notes from the Field

At Ronin Software Group we have a desktop folder with three different shutdowns in it:

1. ShutDown Now
2. Restart
3. Shutdown and do Cleanup Tasks.

It is easier and more consistent than Start->shutDown->Select item, not much easier, but it allows us to select whether to allow CleanUp processing this time.

Some like to HotKey to one or two.

--------------------------------------

In case you start Cleanup by accident.

No problem.

Most shutdown tasks, like ScanDisk or DeFrag , may be interrupted, so there is no time lost if you start a Cleanup run and change your mind.

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top