I'll assume you're running XP...if so, copy the contents below (in between the hash lines), and paste it into Notepad. Save the file with a .reg extension, right click the saved Registry file and select "Merge"...to merge the entries into the Registry.
---------------------------------------------------------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
"ClearPageFileAtShutdown"=dword:00000001
[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"AutoEndTasks"="1"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"WaitToKillServiceTimeout"="1000"
---------------------------------------------------------------------------
There should be no spaces between the O and the L in "Control", in the first and last Registry entries...correct this in Notepad after pasting the above. For some reason the word Control (when used in this context) isn't formatted correctly here in the forums.