how to delete files in user profile
I want to delet files in user profile but use system accoutnd how can i do it?
Community Chosen Answer
I did it in Winbatch, but here's the overall logic:
check in HKLM\Software\Microsoft\Windows NT\CurrentVersion\profilelist to get a list of profiles and SIDS known on the PC
Then check out Software\Microsoft\Windows NT\CurrentVersion\Profilelist\[SID]\profileimagepath to see where those profiles point
If the SID is less than 20 characters in length, ignore it. Otherwise, use that path to check if the folder you want to delete exists, and if so, delete it.
the nice thing about finding these pieces of info in the registry is that you get the SIDS out of this, so if you have other work to do (like cleaning up ActiveSetup), you already have SIDS and IDs associated with one another. Also, that gives you the path so you don't need to worry about XP vs Win 7.