For information: The taskbar's setup is stored in the following registry key :
However, the contents are in binary, so not that easy to change.
The solution could be to use regedit to export the above registry key in its two states : with or without the toolbar. The only hitch is that Explorer has probably to be restarted for the change to take effect, which can be done with a batch file.
Here is a suggestion for such a .bat file :
regedit.exe /s "path of .reg file"
If anything is missing, you could use Sysinternals Process Monitor to trace the "Toolbars -> New toolbar" operation, to see what else is changed in the registry when the toolbar is added.