What do you mean? Take the same code and run it on the same machine under different Windows versions?

This is about the only way. Assuming I got what you want.