This script cleans temporary files, defragments the hard drives and then shuts down the computer.
Actions:
Fixes a common problem related to temporary directories.
Empties temporary folders.
Defragments all fixed hard drives.
Shuts down the computer.
Some commands in this script aren't the same for all windows versions. So be careful and download the right script for your operating system.
Clean, defrag and shutdown for Windows 2000, XP and server 2003:
Clean, defrag and shutdown for Windows7, Vista and server 2008: