How to keep my iTunes (app) library after reinstalling Windows?
Just backup your whole iTunes Library folder. On the new OS, install iTunes, copy your Library to the old place and open iTunes holding down Shift (Windows) or ⌥ (Mac OS).

A dialog should appear:



Select Choose Library... and select your old Library (I think you have to select the xml-file inside the Library folder) and everything should be as it has been before.

Source: How to open an alternate iTunes Library file or create a new one