Jump to content
realcapone

Download CCleaner Slim Version using InetGet

Recommended Posts

realcapone

Hi everyone. I just need help on how to download the Ccleaner Slim version. I am using the slim version so that I can avoid installing the 3rd party applications when I run the installer silently with the script. The full version installer link works fine but when I use the Slim version, it doesn't work at all. Am I missing something?  Thank you. 

Local $UrlDownloader = InetGet("https://www.piriform.com/ccleaner/download/slim", $Directory, 1, 1)

Here's the website for the slim version:

http://www.piriform.com/ccleaner/download/slim

OR

https://www.piriform.com/ccleaner/builds - Full / Portable / Slim

 

Share this post


Link to post
Share on other sites
JLogan3o13

As J1 points out (and the help file clearly states) InetGet gets a file. This works just fine for me:

InetGet("http://www.piriform.com/ccleaner/download/slim/downloadfile", @DesktopDir & "\CCleaner.exe")

 


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
realcapone

Hi guys, thanks for the help. I used the http://www.piriform.com/ccleaner/download/slim because it automatically downloads the file and I didn't notice the download button on that page has a different link so yeah the http://www.piriform.com/ccleaner/download/slim/downloadfile works well. I really did not want to use the main installer for two reasons, the 3rd party apps and also the fact where it would change it's URL if there is an update. I am not yet sure how to go around with that I'm still trying to learn. Again thank you for your help. 

Share this post


Link to post
Share on other sites
pcjunki

I use this to download the portable version and extract it to my desktop

InetClose(-1)
            InetGet("http://www.piriform.com/ccleaner/download/portable/downloadfile", "c:\users\public\desktop\ccleaner.zip", 1, 0)
            InetClose(-1)

            $vbs = (@DesktopDir & "/extract.vbs")
            FileOpen($vbs, 0)
            FileWrite($vbs, 'ZipFile="C:\Users\Public\Desktop\ccleaner.zip"' & @CRLF)
            FileWrite($vbs, 'ExtractTo="C:\Users\Public\Desktop\ccleaner"' & @CRLF)
            FileWrite($vbs, 'Set fso = CreateObject("Scripting.FileSystemObject")' & @CRLF)
            FileWrite($vbs, 'If NOT fso.FolderExists(ExtractTo) Then' & @CRLF)
            FileWrite($vbs, '   fso.CreateFolder(ExtractTo)' & @CRLF)
            FileWrite($vbs, 'End If' & @CRLF)
            FileWrite($vbs, 'set objShell = CreateObject("Shell.Application")' & @CRLF)
            FileWrite($vbs, 'set FilesInZip=objShell.NameSpace(ZipFile).items' & @CRLF)
            FileWrite($vbs, 'objShell.NameSpace(ExtractTo).CopyHere(FilesInZip)' & @CRLF)
            FileWrite($vbs, 'Set fso = Nothing' & @CRLF)
            FileWrite($vbs, 'Set objShell = Nothing' & @CRLF)
            FileClose($vbs)
            Sleep(2000)
            RunWait(@ComSpec & ' /c ' & 'cscript %userprofile%\desktop\extract.vbs', "", @SW_HIDE)
            Sleep(8000)
            FileDelete($vbs)
            FileDelete("c:\users\public\desktop\ccleaner.zip")
            MsgBox(-1, "Download complete", "Ccleaner has been downloaded and extracted to the desktop")

 

Edited by pcjunki

Share this post


Link to post
Share on other sites
realcapone

Hey there @pcjunki. Thanks for your input, somehow I'm not able to see the extracted portable Ccleaner but anyway my script is working fine now using the code above. Now I am wondering if there is any way we can perhaps assign or have a permanent link so that whenever a program or a URL would update then we can still download the latest exe without constantly changing the code. Malwarebytes is one example of this. 

Share this post


Link to post
Share on other sites
realcapone

Thanks John but is there anything equivalent to wget or apt-get? Trying to search the forum for it as I type this but yeah something similar so that it will just take the exe from a repository and you'll only have to type in specific or unchanged file names.

Edited by realcapone

Share this post


Link to post
Share on other sites
pcjunki
InetGet("http://www.piriform.com/ccleaner/download/slim/downloadfile" , "c:\users\public\desktop\ccsetup_slim.exe")

 

use this, it doesn't matter about newer versions or not.

Edited by pcjunki

Share this post


Link to post
Share on other sites
realcapone

Yeah ccleaner is fine but with Malwarebytes and some other programs that constantly updates their URLs with their app version it's not going to work. I'm still trying to find a workaround for it though. Thanks.

Share this post


Link to post
Share on other sites
realcapone

Hi pcjunki, I was trying to use your codes to extract a zipfile but somehow I'm not able to make it work, I am missing something? I'm trying it for CCleaner and TDsskiller. Both are zip files but I don't see it extracted in my desktop though. Thanks

Edited by realcapone

Share this post


Link to post
Share on other sites
pcjunki

pay attention to these 2 lines

 FileWrite($vbs, 'ZipFile="C:\Users\Public\Desktop\ccleaner.zip"' & @CRLF)
 FileWrite($vbs, 'ExtractTo="C:\Users\Public\Desktop\ccleaner"' & @CRLF)
 

Share this post


Link to post
Share on other sites
realcapone

I did. I had to resort to 7z extraction as I was confused with the Filewrite not working. Hehe. Thanks 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×