Smitro Posted June 15, 2009 Posted June 15, 2009 Hi all, I'm trying to make a new version of delprof as it doesn't work with vista. I can't seem to work out how to delete profiles from vista. I've tried deleteing their folder under C:\Users and also deleteing their Profile out of the registry from: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList But then the user can't logon again. It says "The User Profile Service failed the logon". I'd like to reset a whole lot of machines back so that the users recreate their profiles again from the default profile. Any suggestions? I'll try anything!
Paulchen Posted June 15, 2009 Posted June 15, 2009 I use the DeleteProfile WinApi $nRet = DllCall("Userenv.dll", "int", "DeleteProfile", "str", $sid, "ptr", 0, "ptr", 0)More informationen about the API onhttp://msdn.microsoft.com/en-us/library/bb762273(VS.85).aspx
Smitro Posted June 15, 2009 Author Posted June 15, 2009 This is another one of those "I can't believe I spent a whole day working on that" moments. After trying all sorts of things all day long I finally worked it out. The machine I was using for testing acctually had a stuffed up Default user profile. I tried it on another machine and it worked without a problem. I'd acctually been testing on 2 computers, and both had stuffed default profiles, I presume this is from some software I tried out to see if it would do this for me before I wrote my own. So I coppied a new profile over the defaults and we're all sweet and working. If only I'd known before wasting a whole day on it.
MPHillier Posted February 20, 2012 Posted February 20, 2012 Smitro, I am looking to create a similar program that will delete all profiles except those I designate. I've come across this and wanted to find out if you have had any luck with your process. My thought process is to read the registry entries - if not matched with my do not delete list then delete registry entry and c:usersProfile folder.... I'm just finishing up on another program project and in the mead time am gathering info for the next. We are testing with Delprof2 and RemProf but because we have multiple sits with different types of profiles that need to stay on the computers I'd like to make a program that will fit our needs. Using a GPO is not 100% and we cannot control what we don't want to delete... Much Thanks I Break and Fix things... If the surf is up I'm outta here.....
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now