Auto install flash player

Hi,
I know how to detect see whether the flash player has been installed or not in the system but I don’t know how to make it auto install after detected the system don’t have it. So, I wondering if anyone here know how to write a coding to auto install the flash player into our system after detected it?