Jump to content
CCleaner Community Forums
TheOdds

CCPortable

Recommended Posts

[EDIT]

This project has been discontinued! Since version 2.0, CCleaner is natively portable and using this launcher is no longer necessary.

[/EDIT]

Share this post


Link to post
Share on other sites

As you may know CCleaner Portable is now build out of CCPortable source code and me and TwistedMetal are working on the portable version together. So now on I will only only distribute the source code along precompiled bins. If you want ready to run version with latest CCleaner you should download the "official" CCleaner Portable distribution.

 

If you have any questions ideas or you found a bug, you can post them here or just PM me or TwistedMetal. :)

 

As a side news...

CCleaner v2.0 is now being planned and worked on. We're going for a semi-complete rewrite in C++, to allow unicode, 64bit and thumbdrive support.

It looks like CCleaner v2.0 is going to be portable. :)

Edited by TheOdds

Share this post


Link to post
Share on other sites

Very nice of you to release the source code!

 

Way to go!

Respect!

Share this post


Link to post
Share on other sites

Hi, I like this tool and it runs "just fine" on cd but...

but it only scans the content of the cd, could you make it able to scan a remote drive?

I would like to add this to my ubcd4win cd.

Thanks. :D

Share this post


Link to post
Share on other sites

Hi,

 

thanks for this great portable!

I have one question though, is it possible to let it run even when CCleaner is installed on the system?

I think this would be possible by bypassing the registry keys be?ng added and just starting the .exe

 

can anybody please comment on this and possibly what changes need to be made to the .nsi

thanks in advance!

Share this post


Link to post
Share on other sites
Hi, I like this tool and it runs "just fine" on cd but...

but it only scans the content of the cd, could you make it able to scan a remote drive?

I would like to add this to my ubcd4win cd.

Thanks. :D

 

Really. :huh: What exactly is the problem? In my tests everything works just fine regardless of the drive it's running from (usb drive, CD, network drive).

 

Though I am aware of one problem relating to the CD autorun, but in that case CCleaner doesn't even start because the portable app is stuck in loop.

 

 

Hi,

 

thanks for this great portable!

I have one question though, is it possible to let it run even when CCleaner is installed on the system?

I think this would be possible by bypassing the registry keys be?ng added and just starting the .exe

 

can anybody please comment on this and possibly what changes need to be made to the .nsi

thanks in advance!

 

Well you could just run the portable app with /NOIC command line parameter to skip the installation check, but after that the installed CCleaner won't work.

 

Better idea would be to just run the ccleaner.exe like you said, but this could lead to problems if the installed CCleaner isn't the same version as the CCleaner with the portable app. Perhaps better idea would be to run the installed ccleaner.exe when it's detected, but this method isn't perfect either.

 

 

Here's the changes you need to do in the code to just run the ccleaner.exe when CCleaner is installed.

 

To run the ccleaner.exe with the portable app. Replace the piece code in CCPortable.nsi about line 115 with this code...

  CCInstalled:;!ifdef SUPPORT_CMDLINE;	StrCmp ${frce} "1" instwarn;!endifMessageBox MB_ICONQUESTION|MB_YESNO "CCleaner is installed. Run anyway?" IDNO +2  Exec '"$INSTDIR\${CCLEANER_EXE}"${cccmd}'Abort notinstalled:

 

And if you want to run the installed ccleaner.exe replace the piece code in CCPortable.nsi about line 99 with this code...

  ReadRegStr $R1 HKCR "CCSubTimer.CTimer" "" StrCmp $R1 "CCSubTimer.CTimer" CCInstalled 0

And piece code in CCPortable.nsi about line 115 with this code...

  CCInstalled:;!ifdef SUPPORT_CMDLINE;	StrCmp ${frce} "1" instwarn;!endifMessageBox MB_ICONQUESTION|MB_YESNO "CCleaner is installed. Run installed CCleaner?" IDNO +2  Exec '"$R0\${CCLEANER_EXE}"${cccmd}'Abort notinstalled:

Edit: No need to ExecWait :)

Share this post


Link to post
Share on other sites

thanks for your fast and extensive reply!

gonna play around with it

 

I already changed it so it would run the portable without any regsettings but didn't know it could cause problems when the versions aren't the same.

 

thanks again for your great work!

Share this post


Link to post
Share on other sites

...I am aware of one problem relating to the CD autorun...

 

Well I do not use the ccleaner autorun, since I have an extensive amount of other software on my dvd, and I already have an autorun to start a menu when the dvd is put in the drive.

 

I do not know how to program, and I do not know where to start, I just want a program that works and this does not work as a portable apps without changing it.

 

There are other programs that work "right out of the box" without the need for changes.

Until the same can be said about this program, I would not call it portable.

Share this post


Link to post
Share on other sites

Sorry I can't help you. I can't reproduce the problem. Everything works just like it should when I run it from CD so I really can't tell how you end up with this "but it only scans the content of the cd" conclusion, unless you can explain it to me... And you don't need to be programmer to do that.

 

The only thing I can think of is that you are missing some of the CCleaner files (the ini files particularly). Make sure that at least these files are in the same directory with the portable exe.

 

winapp.ini

winreg.ini

winsys.ini

CCHelper.ocx

ccleaner.dll

ccleaner.exe

CCListBar.ocx

CCListView.ocx

CCSubTimer.dll

CCSystem.dll

CCTab.ocx

CCTreeView.ocx

lang-1033.dll

Share this post


Link to post
Share on other sites

OK, I will give it a try...here is what I do...

 

I download and unzip the CCleanerPortable.zip file to a folder, all files as stated are present

next I copy all these files to a folder called ccleaner\files in my ubcd4win\plugin-folder (remember I am using the ubcd4win utility).

 

I make a few changes to the CCPortable.ini

[PORTABLE]

DebugMode=0

LocalSettings=0

ReadOnly=1

CCleanerPath=X:\Programs\CCleaner\

CCommandLine=/NOIC /FORCE

 

I then add an entry to the nu2menu_xml so that it will appear on the start-button-menu.

Once the building of the iso is done using mkisofs, I burn it as an image on a dvd and then I boot with this dvd

When I run the program I start it from the menu entry which is pointing to portable.exe.

The program runs just fine without errors but is only able to locate and clean the disk (X:\ drive)

I can MANUALLY choose folders on any drive and then clean them, but that is not really an option.

 

I actually downloaded the source code, the NSIS and then edited the .nsi and made the changes as described in the forum, made the executable (There is actually an error in line 187), but that did not do it either.

 

Thank you for your patience. B)

Share this post


Link to post
Share on other sites

:rolleyes: Try this open command prompt and run these commands:

echo %tmp%

echo %windir%

echo %appdata%

echo %ProgramFiles%

 

Does all or some of the paths it prints point to the DVD?

Share this post


Link to post
Share on other sites

The result of those commands are:

 

%tmp% =B:

%windir% =X:\i386

%appdata% =B:\UBCD4Win User Settings\Administrator\Application Data

%ProgramFiles% =X:\Programs

 

which is correct for the DVD, but not for CCleaner I suspect!!?

Share this post


Link to post
Share on other sites

The result of those commands are:

 

%tmp% =B:

%windir% =X:\i386

%appdata% =B:\UBCD4Win User Settings\Administrator\Application Data

%ProgramFiles% =X:\Programs

 

which is correct for the DVD, but not for CCleaner I suspect!!?

 

Yes and I quess that B: drive is a ram drive or a virtual drive what ubcd4win created. The problem is that CCleaner doesn't support this kind of cleaning because CCleaner is a "system" cleaner which means that it can only clean the system it is running from and the applications installed on that system. So if the system is runing from DVD...

Share this post


Link to post
Share on other sites

I do not understand how to program these things

but it supposedly works from usb and also from cd but not from a booted cd?

 

When run from usb or cd it is clearly able to find and clean the system, correct?

What makes the program able to find the system so that it can clean it?

Share this post


Link to post
Share on other sites

If you boot your windows from hard drive of the computer and then run the portable CCleaner from usb or CD/DVD it can clean the booted windows and the applications installed in it.

 

If you boot your windows from DVD/CD and then run the portable CCleaner from that DVD/CD it can clean the booted windows and the applications installed in it.

 

And if I have understood you right, you are trying to do this.

You boot your windows from DVD/CD of the computer and then run portable CCleaner from that DVD/CD and try to clean windows and applications installed on the hard drive.

 

So actually when you run portable CCleaner in ubcd4win it is working just the way it should work when it trys to clean the windows and the applications on that DVD.

Share this post


Link to post
Share on other sites

@TheOdds

Yes, you have got it right.

 

Is there no way of redirecting it so it can find and clean the windows system installed on the hdd?

Share this post


Link to post
Share on other sites

Actually... Partly yes, you could simply edit CCleaner ini files (winapp.ini, winapp2.ini and winsys.ini) and change all %something% paths to corresponding paths in hdd and change the Detect keys so that CCleaner could find the things on hdd.

Example: replace all %ProgramFiles% with "C:\Program Files" assuming that "C:\Program Files" is your program files directory. :)

 

But I don't recommend that you actually do this, the "WARNING - DO NOT EDIT THIS FILE" in the beginning of each CCleaner ini file is there for good reason. And it would only work with small amount of things CCleaner can clean so I don't think it would be worth to do anyway.

Share this post


Link to post
Share on other sites

Sorry to disapoint you there but changing all the %something% does not do the trick, have tested it,

what are the "Detect keys"?

 

these?

SpecialDetect=DET_MOZILLA

 

or these?

Detect=HKCU\Software\Acronis\TrueImage

Share this post


Link to post
Share on other sites

Hi, I've tried this, and it's great....

 

Just one question, is it possible to have the "portable.exe" file in a difference folder to "CCleaner.exe"? I'm using the app launcher from portableapps.com, and at the moment I have CCleaner on my list twice. :(

 

Idealy, I want the "portable.exe" file to be in G:\PortableApps\CCleanerPortable,

and "CCleaner.exe" and all the other gubbins to be in G:\PortableApps\CCleanerPortable\App

 

Thanks!

Share this post


Link to post
Share on other sites
Hi, I've tried this, and it's great....

 

Just one question, is it possible to have the "portable.exe" file in a difference folder to "CCleaner.exe"? I'm using the app launcher from portableapps.com, and at the moment I have CCleaner on my list twice. :(

 

Idealy, I want the "portable.exe" file to be in G:\PortableApps\CCleanerPortable,

and "CCleaner.exe" and all the other gubbins to be in G:\PortableApps\CCleanerPortable\App

 

Thanks!

Thank you! :)

 

Add in your portable.ini in [PORTABLE] section value CCleanerPath=App and then just move all the files except portable.exe and portable.ini in the "App" subdir.

Share this post


Link to post
Share on other sites

Sorry to bump this thread up but would it be possible to get the source code please? seems as if the links no longer work

 

If possible is this code available in VB.Net?

 

Many thanks

 

Amarjot Singh

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...