'preserve_history.m' maintains a complete record of the command history (MATLAB only maintains the last 20k worth of commands, so old commands are lost).
To get it to run you need to create a copy of your 'history.m' file and rename it 'history_saved.m'. The path of the history file will be something like "C:\Documents and Settings\poi\Application
There are paths you will need to change in 'preserve_history.m' depending on your installation directory and username on lines: 9,25,47.
Also attached are 'startup.m' and 'finish files.m' which call the preserve_history file and also restore MATLAB to the last working directory whenever it is started.
The attached files must all be copied to "...matlab_directory\toolbox\local\".