Grab themes automatically for automating WordPress installation

Hello,
I intend to automate WordPress installation for my clients (including installing premium themes from ThemeForest). Is it possible to grab the themes from ThemeForest automatically during WordPress installation? And if possible, how can it be done?
Thanks in advance.

There is Envato’s plugin which handles this to an extent (esp. if you buy the theme) BUT:

a) not at the installation of WordPress itself and

b) you are better off having the client buy the theme to prevent any future issues with support or updates

Thank you very much for your reply. Are there any themes on ThemeForest that have an unlimited license that I can buy that lets me install unlimited copies of the theme?
Thanks.

No all licenses are 1 per site

I see. Is it possible for me to clone a wordpress website that has a premium theme installed, and then buying a license for the theme, and entering the purchase code in the theme after cloning to prove that I purchased the theme?

Theoretically BUT the you can’t sell the theme ‘as is’ and it needs to be edited/modified to an acceptable state so you would probably need to be cloning one that has been modified for another client rather than trying to create a generic/plain installation and do it from there

Even then it may not work depending on how the author handles installations and license registration

I see. so I need to install the purchased theme after installing WordPress and not cloning and then entering the purchase code. right?

exactly - i doubt if you try and clone a working version with the license submitted it will work as most authors will block secondary activation

Thank you very much. now it is clear.