Windows XP (NT 5.1) has a different profile structure than Win9x/WinMe, and Microsoft did NOT design the upgrade process to preserve your cookies.
To workaround this feature:
1. In your previous operating system, use Internet Explorer / File / Import\Export to export your cookies to a file.
2. After the upgrade, import your cookies from the file.