Got this from the Apple forum, worked on Windows XP after some how my itunes library got erased.
The manual way around this problem is to use the iPod in its alter ego - that of portable computer disk drive. Successfully tested under iTunes for Windows 4.2, 4.5, 4.6, 4.7; Windows XP Home.
- Start with the iPod disconnected from the computer - DON'T CONNECT IPOD YET
- open iTunes
- open iTunes Preferences - this blocks iTunes from seeing an iPod connection; leave the preferences window up and running
- connect the iPod to the computer, wait about 15 seconds before continuing
- open 'My Computer'
- Tools menu, Folder Options, View tab, enable 'show hidden files /folders'
- open iPod icon in My Computer
- open iPod_Control folder
- you should see a folder named Music
- drag this folder to somewhere on your computer hard drive
- after the copy completes, right-click the new Music folder on your hard drive and select 'Properties'
- clear the checkmark next to 'Hidden'
- Close that explorer window
- eject iPod from System tray "Safely Remove Hardware" icon. This icon looks like a small gray rectangle with a green arrow floating above it. It's only there when a removable device (like the iPod in this case) is attached to the computer. Right-click & select 'Safely remove..', then click 'Stop' in the next window, OK in the next window, and then Close to complete the ejection.
- disconnect the iPod from the computer
- go back to iTunes, cancel the preferences window
- File menu \ Add folder to Library \ find that Music folder copied over from the iPod
Your iTunes library should be back in action