Jump to content

Return to Piriform.com

Photo

Add Path environment variable cleaning


  • Please log in to reply
6 replies to this topic

#1 OFFLINE ekerazha

ekerazha

    Member

  • Members
  • PipPip
  • 14 posts

Posted 09 August 2011 - 05:07 AM

You could add a cleaning option for the "Path" environment variable.

It's a string with semicolon separated values

Example:

C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\QuickTime\QTSystem\

Sometimes you uninstall an application but it doesn't remove its values from the Path environment variable.

CCleaner could check if the listed paths are still available and remove values related to missing dirs.

#2 OFFLINE Super Fast

Super Fast

    Super Hero

  • Members
  • PipPipPipPipPip
  • 2,210 posts
  • Gender:Male

Posted 05 September 2011 - 10:59 AM

Sometimes you uninstall an application but it doesn't remove its values from the Path environment variable.

CCleaner could check if the listed paths are still available and remove values related to missing dirs.

That would be nice, but I doubt they will do that, because of the fact that some applications do overwrite system32 .dll/.ocx files with older/newer variations of the file(s).

Were CCleaner to check if such files existed, then give itself the ok to remove them, it may result in system instability if those files were perhaps, files that were over-written, that turn out to be something Windows does need.

While this sounds great at 1st glance, the fact that some applications see no problem in over-writing key system files would result in CCleaner also removing those files, which may or may not cause Windows to crash/have weird behaviors after this "cleanup".

#3 OFFLINE ekerazha

ekerazha

    Member

  • Members
  • PipPip
  • 14 posts

Posted 06 September 2011 - 04:03 AM

Sorry but I think that you misunderstood something. I'm not talking about files, dll files, ocx files etc.

I'm talking about the PATH environment variable, it's a string.

Posted Image

#4 OFFLINE Alan_B

Alan_B

    Super Hero

  • Members
  • PipPipPipPipPip
  • 4,276 posts
  • Gender:Male
  • Location:Lancashire, England

Posted 06 September 2011 - 06:41 AM

My path is only 105 characters long.
Even allowing for Windows bloat using Unicode instead of Ascii, that is no more than 210 bytes.
Your path is only a few hundred characters long.

Reducing a file or registry value will only affect the number of sector clusters if you cross over a boundary, typically 4096 bytes.

Path optimisation for speed is another matter, but probably not on Piriform's Mission Statement.
It seems inappropriate that your QUICKTIME cannot be launched until after Windows has explored all your TORTOISE folders ! !
I remember that inserting "A:\;" near the beginning of a workmate's path was always good for a laugh ! !

#5 OFFLINE ekerazha

ekerazha

    Member

  • Members
  • PipPip
  • 14 posts

Posted 06 September 2011 - 07:25 AM

CCleaner is not only about cleaning hundreds of megabytes, it cleans histories, recent files lists, small caches etc. CCleaner cleans and in my opinion the PATH variable should be cleaned and orphaned paths should be removed.

#6 OFFLINE hazelnut

hazelnut

    try to stay calm

  • Moderators
  • 12,930 posts
  • Gender:Female
  • Location:Huddersfield uk

Posted 06 September 2011 - 12:03 PM

Thank you ekerazha for taking the trouble to post your suggestion.

The devs read all posts so you never know :)
CCLEANER, RECUVA, DEFRAGGLER AND SPECCY DOCUMENTATION CAN BE FOUND HERE

http://www.piriform.com/docs

#7 OFFLINE Super Fast

Super Fast

    Super Hero

  • Members
  • PipPipPipPipPip
  • 2,210 posts
  • Gender:Male

Posted 09 September 2011 - 12:31 AM

CCleaner is not only about cleaning hundreds of megabytes, it cleans histories, recent files lists, small caches etc. CCleaner cleans and in my opinion the PATH variable should be cleaned and orphaned paths should be removed.

Could be, but also remember, that if this is implemented, that a lot of installers install files in multiple directories.

Were an installer to utilize the quicktime program files folder, then also dump files into the system32 directory, as well as the program files/common files & erase the files contained within these environment variables also, it might make for a very unstable computer.

Very nice suggestion, just not sure how to do it.

Example: %programfiles%/quicktime might work.
But what happens if it is some OTHER program that DOESN'T have just a single directory?

(Remember, they are trying to keep CCleaner safe in the process, & how safe could it be if it removed all %programfiles%/Example Program, %Windir%/system32, etc etc etc?

I do realize what you are talking about, as I have used environment variables myself, just not sure how safe it would be when dealing with complex installers that utilize multiple folder locations/directories. Many programs write to the system area.