Added windows code for populateAddresses

populateAddresses now also works on windows.