Jump to content

Multi User Cleaning


Rooster

Recommended Posts

One of the answers in the FAQ says, "At the moment CCleaner supports cleaning the current user's account only. This may change in a future release."

 

My XP Home system has four user accounts (all Administrators). Whichever logged on account I run CCleaner from, the list of entries from an 'Issues Scan' list (and appear to clean) registry items for all users. Certainly the items found point to files/entries under different user profiles.

 

Is the FAQ out of date or am I misinterpreting things? :huh:

 

Rooster

Link to comment
Share on other sites

  • Moderators

It won't clean internet cache, users temp, and a few other things on every account. The registry is WINDOWS, not per account, and 98% of the cleaning CCleaner does is for WINDOWS (everyone). Hope that answer your question.

Your Friendly Neighborhood Piriform Forum Moderator

Quick Links: CCleaner Products | CCleaner Documentation | Knowledge Center | Downloads | Lost License Key

Link to comment
Share on other sites

  • 3 weeks later...

 

Private Const HKEY_LOCAL_MACHINE = &H80000002Public Function EnumProfiles(ByRef ProfilesDir As String) As BooleanOn Error GoTo ErrorOcc? ?Dim objRegistry, arrSubkeys, objSubkey, strKeyPath As String, strSubPath As String, strValue As String? ?Set objRegistry = GetObject("winmgmts:\\.\root\default:StdRegProv")? ?strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"? ?If objRegistry.GetExpandedStringValue(HKEY_LOCAL_MACHINE, strKeyPath, "ProfilesDirectory", ProfilesDir) <> 0 Then GoTo ErrorOcc? ?If objRegistry.GetStringValue(HKEY_LOCAL_MACHINE, strKeyPath, "AllUsersProfile", strValue) <> 0 Then GoTo ErrorOcc? ?'AddProfilePath ProfilesDir & "\" & strValue? ?If objRegistry.GetStringValue(HKEY_LOCAL_MACHINE, strKeyPath, "DefaultUserProfile", strValue) <> 0 Then GoTo ErrorOcc? ?'AddProfilePath ProfilesDir & "\" & strValue? ?If objRegistry.EnumKey(HKEY_LOCAL_MACHINE, strKeyPath, arrSubkeys) <> 0 Then GoTo ErrorOcc? ?'This function should fail if we have not managed to read the above values as something is seriously wrong.? ?For Each objSubkey In arrSubkeys? ? ? ?strSubPath = strKeyPath & "\" & objSubkey? ? ? ?If GetStrExVal(strSubPath, "ProfileImagePath", strValue) = True Then? ? ? ? ? ?'AddProfilePath strValue? ? ? ?End If? ?Next? ?EnumProfiles = True? ?Exit FunctionErrorOcc:? ?EnumProfiles = FalseEnd FunctionPrivate Function GetStrExVal(ByVal strKeyPath As String, ByVal strValueName As String, ByRef strReturn As String) As Boolean? ?On Error GoTo ErrorOcc? ?Dim objRegistry? ?Set objRegistry = GetObject("winmgmts:\\.\root\default:StdRegProv")? ?If objRegistry.GetExpandedStringValue(HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strReturn) = 0 Then? ? ? ?GetStrExVal = True? ?Else? ? ? ?GetStrExVal = False? ?End If? ?Exit FunctionErrorOcc:? ?GetStrExVal = FalseEnd Function

 

 

Would allow you to enumerate the profile paths...

 

Then just a case of applying the cleaning algorithms to the returned paths...

Link to comment
Share on other sites

And then stumbling over the possible NTFS permissions of those paths, whether the current user is a limited user or not, whether the other user(s) is/are currently logged in, or any files are in use via the Secondary Login service or Fast User Switching, or whether their ntuser.dat needs to be mounted so that CCleaner can enumerate the detected programs and then...

Click here if CCleaner Issues are re-appearing

 

DjLizard.net

DjLizard.net wiki

Dial-a-fix

Dial-a-fix tips

DjLizard.net software support forum

 

Do you live in Bradenton, Sarasota, Tampa, or St. Petersburg, Florida? Visit Digital Doctors where I work :)

Link to comment
Share on other sites

Only offer all user cleaning if the user is logged on as a local administrator.

 

 

Private Declare Function IsNTAdmin Lib "advpack.dll" (ByVal dwReserved As Long, ByRef lpdwReserved As Long) As LongPublic Function IsAdmin() as BooleanIsAdmin = CBool(IsNTAdmin(ByVal 0&, ByVal 0&))End Function

 

 

If cleaning fails because of NTFS file permissions denying the local administrator rights, then so be it. But have some form of notification to say that it failed.

 

Ok, I take your point about logged on users:

 

 

Option ExplicitPrivate Const HKEY_LOCAL_MACHINE = &H80000002Private Protected() As StringPrivate NumProtected As IntegerPrivate Users() As StringPrivate NumUsers As IntegerPublic Function GetLoggedOnUsers() As BooleanOn Error GoTo ErrorOcc? ?Dim objWMIService, objSystemSet, System, iTemp As Integer, sTemp As String? ?NumUsers = 0? ?Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")? ?Set objSystemSet = objWMIService.InstancesOf("Win32_ComputerSystem")? ?For Each System In objSystemSet? ? ? ?sTemp = System.UserName? ? ? ?iTemp = InStrRev(sTemp, "\")? ? ? ?AddUser LCase$(Mid$(sTemp, iTemp + 1, Len(sTemp) - iTemp))? ?Next? ?GetLoggedOnUsers = True? ?Exit FunctionErrorOcc:? ?GetLoggedOnUsers = FalseEnd FunctionPrivate Sub AddUser(ByVal UserName As String)? ?If NumUsers = 0 Then? ? ? ?NumUsers = 1? ? ? ?ReDim Users(1 To NumUsers) As String? ?Else? ? ? ?NumUsers = NumUsers + 1? ? ? ?ReDim Preserve Users(1 To NumUsers) As String? ?End If? ?Users(NumUsers) = LCase$(UserName)End SubPrivate Function CheckUse(ByVal sValue As String) As Boolean? ?Dim Count As Integer? ?sValue = LCase$(sValue)? ?For Count = 1 To NumUsers? ? ? ?If sValue Like Users(Count) & ".*" Or sValue = Users(Count) Then? ? ? ? ? ?CheckUse = True? ? ? ? ? ?Exit For? ? ? ?End If? ?Next CountEnd FunctionPrivate Sub AddProtected(ByVal FolderName As String)? ?If NumProtected = 0 Then? ? ? ?NumProtected = 1? ? ? ?ReDim Protected(1 To NumProtected) As String? ?Else? ? ? ?NumProtected = NumProtected + 1? ? ? ?ReDim Preserve Protected(1 To NumProtected) As String? ?End If? ?Protected(NumProtected) = LCase$(FolderName)End SubPrivate Function IsProtected(ByVal FolderName As String) As Boolean? ?Dim Count As Integer? ?FolderName = LCase$(FolderName)? ?For Count = 1 To NumProtected? ? ? ?If Protected(Count) = FolderName Then? ? ? ? ? ?IsProtected = True? ? ? ? ? ?Exit For? ? ? ?End If? ?Next CountEnd FunctionPublic Function EnumProfiles(ByRef ProfilesDir As String) As BooleanOn Error GoTo ErrorOcc? ?Dim objRegistry, arrSubkeys, objSubkey, strKeyPath As String, strSubPath As String, strValue As String, iTemp As Integer, sUser As String? ?NumProtected = 0? ?Set objRegistry = GetObject("winmgmts:\\.\root\default:StdRegProv")? ?strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"? ?If objRegistry.GetExpandedStringValue(HKEY_LOCAL_MACHINE, strKeyPath, "ProfilesDirectory", ProfilesDir) <> 0 Then GoTo ErrorOcc? ?If objRegistry.GetStringValue(HKEY_LOCAL_MACHINE, strKeyPath, "AllUsersProfile", strValue) <> 0 Then GoTo ErrorOcc? ?AddProtected strValue? ?'AddProfilePath ProfilesDir & "\" & strValue? ?If objRegistry.GetStringValue(HKEY_LOCAL_MACHINE, strKeyPath, "DefaultUserProfile", strValue) <> 0 Then GoTo ErrorOcc? ?AddProtected strValue? ?'AddProfilePath ProfilesDir & "\" & strValue? ?If objRegistry.EnumKey(HKEY_LOCAL_MACHINE, strKeyPath, arrSubkeys) <> 0 Then GoTo ErrorOcc? ?? ?'This function should fail if we have not managed to read the above values.? ?? ?For Each objSubkey In arrSubkeys? ? ? ?'Get the right subkey.? ? ? ?strSubPath = strKeyPath & "\" & objSubkey? ? ? ?? ? ? ?If GetStrExVal(strSubPath, "ProfileImagePath", strValue) = True Then? ? ? ? ? ?'Get the user stub.? ? ? ? ? ?iTemp = InStrRev(strValue, "\")? ? ? ? ? ?sUser = Mid$(strValue, iTemp + 1, Len(strValue) - iTemp)? ? ? ? ? ?If CheckUse(sUser) = True Then? ? ? ? ? ? ? ?'AddProfilePath strValue? ? ? ? ? ? ? ?AddProtected sUser? ? ? ? ? ?End If? ? ? ?End If? ? ? ?? ?Next? ?EnumProfiles = True? ?Exit FunctionErrorOcc:? ?EnumProfiles = FalseEnd FunctionPrivate Function GetStrExVal(ByVal strKeyPath As String, ByVal strValueName As String, ByRef strReturn As String) As Boolean? ?On Error GoTo ErrorOcc? ?Dim objRegistry? ?Set objRegistry = GetObject("winmgmts:\\.\root\default:StdRegProv")? ?If objRegistry.GetExpandedStringValue(HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strReturn) = 0 Then? ? ? ?GetStrExVal = True? ?Else? ? ? ?GetStrExVal = False? ?End If? ?Exit FunctionErrorOcc:? ?GetStrExVal = FalseEnd Function

 

 

I'll also code a running processes check to enumerate all user contexts when I can get around to it...

 

I'll have to think about the NTUSER.DAT and get back to you...

Link to comment
Share on other sites

Why are you wasting so much time posting VB code? MrG can't use it... because then you could claim that he stole it. Besides, MrG is a highly capable programmer, and most likely doesn't need outside assistance for his program (otherwise he would have already asked for it).

Click here if CCleaner Issues are re-appearing

 

DjLizard.net

DjLizard.net wiki

Dial-a-fix

Dial-a-fix tips

DjLizard.net software support forum

 

Do you live in Bradenton, Sarasota, Tampa, or St. Petersburg, Florida? Visit Digital Doctors where I work :)

Link to comment
Share on other sites

Why are you wasting so much time posting VB code? MrG can't use it... because then you could claim that he stole it.  Besides, MrG is a highly capable programmer, and most likely doesn't need outside assistance for his program (otherwise he would have already asked for it).

 

 

 

 

No offense but I really don't understand why you feel so threatened and are being so hostile and derisory towards me. :huh:

 

I certainly don't feel that I am wasting my time.

 

And how can somebody steal code that has been posted in the open? (Don't forget that this is Visual Basic - its simple to code in...)

 

I am not after any recognition - or anything like that, I just want to see CCleaner get better. I don't see why you are intent on besmirching me.

 

The ability to clean multiple profiles would, in my opinion, make this great program even better.

 

I am not disputing anybody's ability to program.

 

Why are you so against me attempting to contribute?

Link to comment
Share on other sites

Just thought it was pretty useless. If he wanted to do that, he'd have done it. Continue... I'm not standing in your way. I didn't *besmirch* you by any means. I merely asked why you were wasting time. You took my comments a bit more haughtily than they were intended. Apologies...

Click here if CCleaner Issues are re-appearing

 

DjLizard.net

DjLizard.net wiki

Dial-a-fix

Dial-a-fix tips

DjLizard.net software support forum

 

Do you live in Bradenton, Sarasota, Tampa, or St. Petersburg, Florida? Visit Digital Doctors where I work :)

Link to comment
Share on other sites

I hope I am in the right area to ask about WinXP. I was wondering for WinXP if CCleaner works on all users of pc. There are 2 administrators and the other two are not.

 

Question: Can I run CCleaner on Administrator's desktop and be done with it, or do I need to run it on all users?

 

Any help with this is appreciated.

 

Thanks in advance for your replies!

Link to comment
Share on other sites

Run it on all users.

 

 

 

 

No offense intended, but I will not use this program until it can do all users. It seems like a great program, and I keep checking back every few months with the hope that this feature is added. Obviously, I understand such a feature would only work when logged in as an admin.

 

The reason that the feature is so important to me is that I work on computers all day. Removing all the temp files for all users can save a ton of time when doing multiple spyware scans *and* multiple virus scans. If I have to log in as each user to run CCleaner 2 to 4 times, it defeats the purpose of saving time and being efficient.

 

For now, I will continue to run my home-cooked solution for this with the hopes that the CCleaner author will add it at a later date. Again, no offense intended to the author as I know he is not making any money for this project, therefore we have no right to demand anything.

 

SG

Link to comment
Share on other sites

It won't work unless CCleaner logs on all of the users automatically, and it doesn't matter if you're an administrator or not. Windows XP doesn't load ntuser.dat for each person unless they're logged in [although it could be done with a lot of code and the right security token]. Windows XP also has the ability to privatize folders in Documents and Settings, and it usually does so if there is a password set on the user. It even blocks users belonging to the administrator group, and the Administrator account itself. This is even more difficult to deal with in XP Home, as you can only access the Security tab through safe mode. This is an awful lot of stuff to handle in a small Visual Basic application such as CCleaner. Therefore, you will probably never use CCleaner.

Click here if CCleaner Issues are re-appearing

 

DjLizard.net

DjLizard.net wiki

Dial-a-fix

Dial-a-fix tips

DjLizard.net software support forum

 

Do you live in Bradenton, Sarasota, Tampa, or St. Petersburg, Florida? Visit Digital Doctors where I work :)

Link to comment
Share on other sites

DjLizard,

 

All I am talking about is deleting for every user:

 

Temporary Internet Files

Temp Files

History

Recent

Cookies

 

These can be voluminous and cause virus scans to take much longer. As you probably know, you *CAN* delete them from any administrator account. I can post my crude code, if there is any question, though, of course, you and the programmer of CCleaner could program circles around me.

 

Therefore, you will probably never use CCleaner.

 

My apologies as I did not realize you had the authority to announce what features would or would not be available in future releases. Judging from the posts where you have gotten abrasive with the newbies, I would suggest not taking some of these "civil" discussions too personal. It is a great product already. We are not throwing off on the product, just "discussing" our wish lists. This is what this forum is for, is it not?

 

SG

Link to comment
Share on other sites

Am I abrasive? Maybe I should just stop posting altogether. I've only recently been abrasive with the regulars, but if everyone feels like I'm abrasive to the newbies I'll watch myself.

I agree that those folders are pains in the ass when doing virus scans.

Have you attempted to delete these files on systems where the user account folder has been privatized? It's not possible as an Administrator. You practically [not literally, mind you] have to take ownership in order to even get *in* the profile folder. That's a pain in the ass, too.

 

No, I don't have the authority to announce what features would or would not be available in future releases, and you should not assume as such. I was only poking you about what you said in your first line: you wouldn't use CCleaner until it cleans all users.

 

This entire thread has made me look and act like an ass, so you can count on my disappearance from this area. Bye.

Click here if CCleaner Issues are re-appearing

 

DjLizard.net

DjLizard.net wiki

Dial-a-fix

Dial-a-fix tips

DjLizard.net software support forum

 

Do you live in Bradenton, Sarasota, Tampa, or St. Petersburg, Florida? Visit Digital Doctors where I work :)

Link to comment
Share on other sites

Hey SuperGlide,

 

I have the need for what you described as well. Can you send me your code ... regardless of how crude it is. Maybe we can work together to come up with a solution to clean all the tif files from each profile on a machine.

 

Thanks,

 

trent

trent@southsidegallatin.org

Link to comment
Share on other sites

It is very cumbersome to login with each user account and do cleaning.

Is it possible to do cleaning for all users (all profiles)?

I think Adminstrator user should have this privilige to do cleaning for all profiles.

 

 

There is a non free software "Tracks Eraser Pro" that have this option to clean all profiles. I wish CCleaner have this feature too.

 

thanking you.

Link to comment
Share on other sites

  • Moderators

I just saw this and now know what you meant on your site Dj. I was just being a smart ass when I wrote that because of that guy woodland who you were kind of going back and forth with. Dont worry though I'm not scared of the big bad lizard. :lol:

Link to comment
Share on other sites

  • 3 years later...
It is very cumbersome to login with each user account and do cleaning.

Is it possible to do cleaning for all users (all profiles)?

I think Adminstrator user should have this privilige to do cleaning for all profiles.

 

 

There is a non free software "Tracks Eraser Pro" that have this option to clean all profiles. I wish CCleaner have this feature too.

 

thanking you.

 

I agree that CCleaner should AT LEAST have a feature to be available on all user accounts. I mean, access from the start menu. I also think that this feature mentioned above is a needed one.

Link to comment
Share on other sites

No offense intended, but I will not use this program until it can do all users. It seems like a great program, and I keep checking back every few months with the hope that this feature is added. Obviously, I understand such a feature would only work when logged in as an admin.

 

The reason that the feature is so important to me is that I work on computers all day. Removing all the temp files for all users can save a ton of time when doing multiple spyware scans *and* multiple virus scans. If I have to log in as each user to run CCleaner 2 to 4 times, it defeats the purpose of saving time and being efficient.

 

For now, I will continue to run my home-cooked solution for this with the hopes that the CCleaner author will add it at a later date. Again, no offense intended to the author as I know he is not making any money for this project, therefore we have no right to demand anything.

 

SG

 

Is it a batch file or actual code? I'd like to see it if it's a batch file. I too deal with user's computers who have 4-5 profiles on average and it tends to get tedious logging into each account to clean our the TIF files. Usually the viruses are harbored on the other inactive profiles that were used once or twice.

 

Keith

There's always an exception to the rule. I'm that exception.

 

Desktop ----- AMD Athlon 3700+ (2.64Ghz), 2GB DDR 400, ASUS A8N-SLI Premium, 500GB HD, Windows XP Pro SP3, Avira Antivir Personal

At work ----- Intel C2D T1700 (1.6Ghz), 2GB DDR2 667, Dell OUY141, 80GB HD, Windows XP Pro SP2, Symantec 10

Laptop ----- Intel C2D P8400 (2.4 Ghz), 4GB DDR3 1066, Mainboard, 160GB HD, Dualboot: Windows 7/openSUSE 11.1, Avira Antivir Personal

 

link1.gif

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.