Question about Documents And Settings - TechRepublic
Question
July 17, 2009 at 12:54 PM
slayer_

Question about Documents And Settings

by slayer_ . Updated 16 years, 11 months ago

I got a task, during an update, I need to delete shortcuts (Fun eh). Both the install made, and any extras the user may have made. I already am pretty sure of the way to examin shortcuts, now I just need to find them.

Indexing files is of course easy, and searching for LNK file extensions is a breaze.

But the trick is, these damn things could be in any user folder.

Basically, I need to search every folder and subfolder in the Documents And Settings folder.

I want to avoid hard coding this, because doesn’t Vista or W7 already have this folder renamed?

I was looking at environment variables, but only two that I see seem close.

“ALLUSERSPROFILE”
“USERPROFILE”

Both are close, requiring only one step up, which can be done easily enough, but if there is a way to go straight to the folder I want, I want to do that.

Admin access to these folders is a must for the basic installs, so I should have access to everything in the documents and settings folders.

We don’t support systems older than Windows 2000, so legacy isn’t a big issue. Just future planning.

Suggestions anyone?

This discussion is locked

All Comments