Download and Install CCleaner

Please use the script to download CCleaner executable file to specific folder and get installed on your target machine

import urllib
import os

def main(Path, URL='', sCMD='/S'):
    if os.path.exists(Path):
        fn = URL.split('/')[-1]
        fp = os.path.join(Path, fn)
            with open(fp, 'wb') as f:
                    print fp
                except Exception as e:
                    print e
        except Exception as e:
            print e
            os.popen(fp+' '+sCMD).read()
            return 'Great! Successfully Installed'
        except Exception as e:
            return e
        return 'No path: '+Path+' is exist'

print main('C:\\Users\\Prime\\Downloads')

Sample Output:

Download and Install CCleaner.PNG

Hi @phcsolutions,

Thanks for the information, we will keep only the second one on the forum.

But on using the second script,
Please update the variable FileName=‘ccsetup523’ without any extension on the script

Please let me know if there any more assistance requires from me?

Thank you.