gmonks Posted October 8, 2012 Posted October 8, 2012 Hi, Is there a utility to delete the profiles in Windows 7 like with XP? The windows XP utility doesn't work in Windows 7. Thanks George.
penfold Posted October 8, 2012 Posted October 8, 2012 This can be done through GPO alternatively you could use Delprof2 which I've used recently. 2
VeryPC_Tom_M Posted October 8, 2012 Posted October 8, 2012 Delprof won't run on anything past XP. You can always try remprof, by CTRL ALT DEL IT.. Ctrl-Alt-Del ® IT Consultancy - citrix brisbane virtual office tsloadbal tsbackdrop tswhereis bombprof icsweep remprof defset qrypubapp qrydeptapp qryclientip tspasschg gettscip qrytscip tsreboot tslogoff getpubapp envtscip tsmsg remote desktop pcbac It's worth bearing in mind that it won't run remotely however..
Bezwick Posted October 8, 2012 Posted October 8, 2012 We use delprof here on both Windows 7 x86 and x64 (professsional) images and it works no problem as long as you run it from a command prompt that has "run as administrator" privleges.
Ashm Posted October 8, 2012 Posted October 8, 2012 This can be done through GPO alternatively you could use Delprof2 which I've used recently.+1 we Delprof2 on Windows 7, seems to work well. 1
themightymrp Posted October 8, 2012 Posted October 8, 2012 I use the following code in a startup VB script, seems to work ok: Const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv") 'root of registry keys strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" 'build collection of keys to check objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys 'we now have a collection of subkeys in 'arrSubKeys' 'look inside each key For Each subkey In arrSubKeys CheckKey (strKeyPath & "\" & subkey) Next Sub CheckKey (key) 'check the key to see if contains 'CentralProfile" string value (REG_SZ) objReg.GetStringValue HKEY_LOCAL_MACHINE,key,"CentralProfile",sValue 'if the value is set, then it refers to a central profile and must be deleted If Not IsNull (sValue) Then DeleteKey (key) End If End Sub Sub DeleteKey (thisKey) 'delete all subkeys objReg.EnumKey HKEY_LOCAL_MACHINE, thisKey, arrSubKeys If IsArray (arrSubKeys) Then For Each strSubKey In arrSubKeys 'recursively delete the key DeleteKey (thisKey & "\" & strSubKey) Next End If 'delete the registry key objReg.DeleteKey HKEY_LOCAL_MACHINE,thisKey End sub
gmonks Posted October 8, 2012 Author Posted October 8, 2012 This can be done through GPO alternatively you could use Delprof2 which I've used recently. Thank you, I will try this.
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