Extract images on windows platform bugfix

Use set command to set "gm" environment variables on windows platform.