/bundles/itninjaweb/img/Breadcrumb_cap_w.png
I need to write a cleanup profiles script to automate the removal of profiles. Usually I do this from System Properites, User Profiles and click delete on each one. Firstly I need to find out what profiles are on a machine then I need to be able to remove them using VBscript.

Can anyone help?
0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

0
I've been working on a script to do this myself. I wound up looking at the keys under HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList and enumerating them. Now I have a list of all the SIDs and corresponding user accounts. What I wanted to do next was use those in a command line using "rundll32 userenv.dll,DeleteProfile,<SID>,<Profile_Path>,<Computername> but am having problems getting that to run. It keeps telling me there's a missing entry.

Did you ever get this to work?

BTW, DelProf.exe will NOT work for me. I need to be able to kill a specific profile on a system from a non-interactive script.
Answered 01/23/2006 by: jbonbright
Senior Yellow Belt

Please log in to comment
0
MS has utility called delprof.exe designed just for that... Search their site...
Answered 01/23/2006 by: revizor
Third Degree Blue Belt

Please log in to comment
0
From my previous post:

"BTW, DelProf.exe will NOT work for me. I need to be able to kill a specific profile on a system from a non-interactive script. "

DelProf.exe was the first thing I tried. I haven't played with it since I posted the original message over a year ago, but I couldn't get it to delete a specific user profile, unbelievably. Just got a WMI book and will explore that route.
Answered 03/22/2007 by: jbonbright
Senior Yellow Belt

Please log in to comment