+ Post New Thread
Results 1 to 7 of 7
Windows 7 Thread, Delprof in Technical; Hi, Is there a utility to delete the profiles in Windows 7 like with XP? The windows XP utility doesn't ...
  1. #1
    gmonks's Avatar
    Join Date
    Oct 2012
    Location
    Bedfordshire
    Posts
    203
    Thank Post
    112
    Thanked 24 Times in 17 Posts
    Rep Power
    11

    Delprof

    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.

  2. #2


    Join Date
    Sep 2008
    Posts
    1,858
    Thank Post
    354
    Thanked 264 Times in 216 Posts
    Rep Power
    121
    This can be done through GPO alternatively you could use Delprof2 which I've used recently.

  3. 2 Thanks to penfold:

    gmonks (8th October 2012), timzim (15th November 2012)

  4. #3
    VeryPC_Tom_M's Avatar
    Join Date
    Aug 2012
    Location
    Sheffield
    Posts
    388
    Thank Post
    14
    Thanked 82 Times in 79 Posts
    Rep Power
    45

  5. #4
    Bezwick's Avatar
    Join Date
    Feb 2008
    Location
    Nottinghamshire
    Posts
    367
    Thank Post
    94
    Thanked 60 Times in 45 Posts
    Rep Power
    26
    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.

  6. #5

    Join Date
    Oct 2007
    Location
    Northamptonshire
    Posts
    315
    Thank Post
    22
    Thanked 83 Times in 70 Posts
    Rep Power
    45
    Quote Originally Posted by penfold View Post
    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.

  7. Thanks to Ashm from:

    gmonks (8th October 2012)

  8. #6
    themightymrp's Avatar
    Join Date
    Dec 2009
    Location
    Leeds, West Yorkshire
    Posts
    1,291
    Thank Post
    219
    Thanked 238 Times in 206 Posts
    Rep Power
    76
    I use the following code in a startup VB script, seems to work ok:

    Code:
    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

  9. #7
    gmonks's Avatar
    Join Date
    Oct 2012
    Location
    Bedfordshire
    Posts
    203
    Thank Post
    112
    Thanked 24 Times in 17 Posts
    Rep Power
    11
    Quote Originally Posted by penfold View Post
    This can be done through GPO alternatively you could use Delprof2 which I've used recently.
    Thank you, I will try this.



SHARE:
+ Post New Thread

Similar Threads

  1. DelProf not deleting all profiles issue!
    By mmoseley in forum Windows
    Replies: 7
    Last Post: 19th October 2008, 11:37 PM
  2. delprof all stations
    By choran in forum Windows
    Replies: 1
    Last Post: 19th November 2007, 01:55 PM
  3. delprof broke java HELP
    By spacemanvic in forum Windows
    Replies: 7
    Last Post: 14th December 2006, 11:58 PM
  4. Replies: 17
    Last Post: 14th December 2006, 02:52 PM
  5. Delprof... is it necessary?
    By _Bat_ in forum Windows
    Replies: 6
    Last Post: 8th September 2006, 06:29 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •