Download msys2-i686-YYYYMMDD.exe package if your windows machine is 32 bit otherwise download msys2-x84_64-YYYYMMDD.exe if you windows machine is 64 bit.
Run the downloaded exe file. It will install MSYS2 and then start the command line.
On the command line run
> pacman -Syu
After it is done and gives the message to terminate the shell. Terminate the shell without returning to the prompt.