Add XD_CONFIG windows support

- Fix xd scripts