CCleaner on a flash drive

CCleaner is such a handy program that I would like to take it with me on my flash drive. I copied all the files from the installed program folder to my flash drive (except the .reg backups) and tried to run it on another computer. I got a runtime error. Evidently it relies on the registry or some such for its settings. :(

Is there a way around this? If not -- a possible new feature?

-- Tim

Copy the downloaded program (save it) and install on the new computer, and install to the flash drive. Then the entries will be there, minus the flash when you depart.

Copy the downloaded program (save it) and install on the new computer, and install to the flash drive. Then the entries will be there, minus the flash when you depart.

22721[/snapback]

That's a good idea, but not exactly what I want. I really don't want to have to install CCleaner every time I want to use it. For example, if I am halping a friend with a full disk problem, I want to be able to pop in my flash drive and do some cleaning.

Thanks for the idea, though. :)

-- Tim

See what you are getting at. Though it would certainly be a good idea to leave all your friends with an installed version!!

You could then copy onto your memory stick for your next first aid job from a setup exe you keep on your desktop. :)

I too would love a version that would run directly off a pen drive, or even as a u3 app for those of us with u3 capable pen drives (see www.u3.com for info)

Although I haven't tried it, if you copy all the files from the install folder onto the pen drive, then write a batch file to register all the DLLs/OCX files - run the app - then unregister them. This should work.

You can register with "regsvr32 cchelper.ocx"

and unregister with "regsvr32 /u cchelper.ocx"

Although I haven't tried it, if you copy all the files from the install folder onto the pen drive, then write a batch file to register all the DLLs/OCX files - run the app - then unregister them. This should work.

You can register with "regsvr32 cchelper.ocx"

and unregister with "regsvr32 /u cchelper.ocx"

23621[/snapback]

I was wondering how to be able to travel with CCleaner on my pen drive between many customers sites, and you give me a direction to work.

I have test your solution, and unfortunately, it is not complete.

I think someone could do better than me, but here is what i did to be able to run CCleaner from different location that C:\program files\CCleaner.

For my tests, I rename CCleaner folder (with CCleaner2 and CCleaner3) that does exactly the same that when you try to launch from a pen drive, with no needed registered files. I have created a batch file that registered all the OCX and DLL files (I made a registry search and discover than both DLL and OCX were registered), launch the program, and unregistered the files.

here the script:

@ECHO OFF

Echo Registering Components

regsvr32 /s CCHelper.ocx

regsvr32 /s ccleaner.dll

regsvr32 /s CCListBar.ocx

regsvr32 /s CCListView.ocx

regsvr32 /s CCSubTimer.dll

regsvr32 /s CCSystem.dll

regsvr32 /s CCTab.ocx

regsvr32 /s CCTreeView.ocx

CALL ccleaner.exe

pause

Echo Un-Registering Components

regsvr32 /s /u CCHelper.ocx

regsvr32 /s /u ccleaner.dll

regsvr32 /s /u CCListBar.ocx

regsvr32 /s /u CCListView.ocx

regsvr32 /s /u CCSubTimer.dll

regsvr32 /s /u CCSystem.dll

regsvr32 /s /u CCTab.ocx

regsvr32 /s /u CCTreeView.ocx

pause

It's a very basic script, so feel free to upgrade the code. i did this very quickly to provide an answer.

One Note: If you want to keep your settings (delete saved password, and other stuff) be careful to backup HKCU\Software\VB and VBA Program Settings\CCleaner key, and do a regedit /s "yourregnamedfile.reg" before launching CCleaner.exe

Hope this help

Regards

maybe we should have a portable ccleaner just like portable firefox...u can bring it anywhere u want...so useful and save time...

Registering files aside, a problem that may be encountered on non WinXP machines is not having the VB Runtime 6 files installed, although that does seem rather unlikely with so many programs that require them.

maybe we should have a portable ccleaner just like portable firefox...u can bring it anywhere u want...so useful and save time...

23699[/snapback]

Registering files aside, a problem that may be encountered on non WinXP machines is not having the VB Runtime 6 files installed, although that does seem rather unlikely with so many programs that require them.

23701[/snapback]

If CCleaner was made in Delphi, it would be a lot faster, run better, wouldn't need all those VB dependencies, and when UPXed it would probably be around 250KB.

If CCleaner was made in Delphi, it would be a lot faster, run better, wouldn't need all those VB dependencies, and when UPXed it would probably be around 250KB.

23717[/snapback]

That's actually not true, both versions would run at a similar speed as they rely on the same system API calls to operate. Although I agree it would be nice to have a version that operated as a single EXE with no dependencies.

Although I agree it would be nice to have a version that operated as a single EXE with no dependencies.

23721[/snapback]

That would be cool! Perhaps "CCleaner Portable" or whatever name. Another ideal would be to just have the main program as a standalone EXE that runs off a single INI file possibly "c:\windows\ccleaner.ini" with no usage of the registry whatsoever.

Here is my version of Saison's Script:

@ECHO OFFEcho Registering Componentsregsvr32 /s CCHelper.ocxregsvr32 /s ccleaner.dllregsvr32 /s CCListBar.ocxregsvr32 /s CCListView.ocxregsvr32 /s CCSubTimer.dllregsvr32 /s CCSystem.dllregsvr32 /s CCTab.ocxregsvr32 /s CCTreeView.ocxEcho Copying Existing CCleaner Settings From RegistryC:\WINDOWS\regedit.exe /e CCleanBACKUP.reg "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\CCleaner"Echo Mergeing CCleaner Settings To RegistryC:\WINDOWS\regedit.exe /s CClean.regCALL CCleaner.exeEcho Copying CCleaner Settings From RegistryC:\WINDOWS\regedit.exe /e CClean.reg "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\CCleaner"Echo Deleting CCleaner Settings From RegistryC:\WINDOWS\regedit.exe /s CCleanDelete.regEcho Mergeing Existing CCleaner Settings To RegistryC:\WINDOWS\regedit.exe /s CCleanBACKUP.regdel CCleanBACKUP.regEcho Un-Registering Componentsregsvr32 /s /u CCHelper.ocxregsvr32 /s /u ccleaner.dllregsvr32 /s /u CCListBar.ocxregsvr32 /s /u CCListView.ocxregsvr32 /s /u CCSubTimer.dllregsvr32 /s /u CCSystem.dllregsvr32 /s /u CCTab.ocxregsvr32 /s /u CCTreeView.ocx

What it does is:

Registers the DLL's & OCX's

Backups any existing CCleaner settings to CCleanBACKUP.reg

Merges the personal settings from CClean.reg

Runs CClean.exe

Backs up the personal settings applied earlier to CClean.reg

Deletes the Settings from the registry using CCleanDelete.reg

Re-Merges the existing settings to the registry from CCleanBACKUP.reg

Deletes CCleanBACKUP.reg

Un-Registers the DLL's and OCX's

Contents of CCleanDelete.reg:

Windows Registry Editor Version 5.00[-HKEY_CURRENT_USER\Software\VB and VBA Program Settings\CCleaner]

I tried it several times and so far it has prooved successful. B)

Mushu13,

As a total neophyte, can you please guide me as to what, and how, I am meant to handle that revised script of <Saison's>?

1. Do you type the 'script' and save it as batch file or what?

2. Where does the portion of the <CCleandelete.reg> go? In the same script as in [1] or is it saved as a separate "reg" text file?

3. Do I copy the latest version of CCleaner to the USB disk and install it from there?

4. When, or at what stage, do I run the above 'script'/batch file or whatever in order to make it <portable>?

Sorry to ask such silly questions, but I am nowhere near your level of competency, as you can see.

Thank you, and regards.

To answer your questions:

1. Yes the script goes as a .bat file

2. The CCleandelete.reg goes as it's own .reg file

3. Install CClean to it's default folder "C:\Program Files\CCleaner" then copy the entire folder to your flash drive. (You can now uninstall it from your computer.)

Also, place the script and CCleandelete.reg inside the CCleaner folder.

4. Just double click on the script and it should do everything from there.

If you have any more questions just post here and I'll try to help. B)

Thank you very much, MUSHU13!!! It works perfectly!!!!

Glad I could help! B)

Can someone please make a portable version of CCleaner and upload it as i am not very experienced with creating batch files etc. :)

I made a simple to use version and did some changes to it. Just PM me if you want to test it out.