The calculated distance (air line) between Hamilton and Windsor is approximately 174 miles respectively 279 kilometers.
By car or train, the actual journey to Windsor is certainly longer, as only the direct route (as the crow flies) between Hamilton and Windsor has been calculated here.