Agent changes for windows support (II)