And better make a backup of the "key" file found in your dominions2 folder.
Then, when installing again, do not start the game, but simply copy in the key file into the new dominions folder - and the game will not ask you for the key on the first startup even!
And you do make backup of your important data, don't you?!