+ Post New Thread
Page 2 of 5 FirstFirst 12345 LastLast
Results 16 to 30 of 75
Windows Thread, Script to delete profile at log off? in Technical; Originally Posted by Gatt The GPO setting is only for cached copies of ROAMING profiles - therefore wont work on ...
  1. #16
    ajbritton's Avatar
    Join Date
    Jul 2005
    Location
    Wandsworth
    Posts
    1,632
    Thank Post
    23
    Thanked 75 Times in 45 Posts
    Rep Power
    34

    Re: script for deleting local profiles on logoff

    Quote Originally Posted by Gatt
    The GPO setting is only for cached copies of ROAMING profiles - therefore wont work on locally stored profiles..

    Delprof doesn't need to be copied to the client - I run it from a batch file stored in the NETLOGON share using GPO logoff script
    Why not just put the batch file and DELPROF in the GPO as well? That way it's cached on the PCs and should run if disconnected.

  2. #17
    tarquel's Avatar
    Join Date
    Jun 2005
    Location
    Powys, Mid-Wales, UK
    Posts
    1,740
    Thank Post
    13
    Thanked 44 Times in 34 Posts
    Rep Power
    29

    Re: script for deleting local profiles on logoff

    Pay Geoff....Pay? hehe

    [PS i'm going to merge this with the exact same topic as the other one thats at the top of this board *rolls eyes*]

    Nath

  3. #18

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Script to delete profile at log off?

    It's donationware. You just have to redownload it every 2 months:

    Remote Profile Cleaner is available as donationware only. The complete program is available as a Windows installer and can be downloaded from the links on the bottom of this page. Please notice that a serial number is not required to install or use Remote Profile Cleaner for non-commercial usage. Unregisterd versions will expire two months after their release date. If you choose to register your copy of Remote Profile Cleaner, a serial number is send to you as soon as we receive your minimum donation of € 45.00

  4. #19
    pinemarten's Avatar
    Join Date
    Dec 2005
    Posts
    232
    Thank Post
    23
    Thanked 24 Times in 16 Posts
    Rep Power
    28

    Re: Script to delete profile at log off?

    Craig
    "Delprof doesn't need to be copied to the client - I run it from a batch file stored in the NETLOGON share using GPO logoff script"

    tried that & it doesn't work for me - batch file doesn't support UNC path & also I think user has insufficient access to run delprof - any ideas?

  5. #20

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Script to delete profile at log off?

    run it at machine startup.

  6. #21

    Join Date
    Oct 2006
    Location
    Ohio USA
    Posts
    14
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Script to delete profile at log off?

    I have placeed a bat file to run Delprof in NETLOGON and using GPO logoff script. I believe that it is deleting my test profile, but the logoff script runs before the "network connections" screen and then "saving your settings" screen appears, which I believe, is placing the profile right back in the "Documents and Settings" folder. How do I set the logoff script to run at the very end or how do I switch off the "save your settings" process?

  7. #22

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: Script to delete profile at log off?

    you can't delete a profile that's in use.
    you can't alter when logoff scripts are run within the logoff process.

  8. #23

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498

    Re: Script to delete profile at log off?

    Quote Originally Posted by Geoff
    run it at machine startup.
    D'oh - silly me - I run it at startup ops:

  9. #24
    woody's Avatar
    Join Date
    Jun 2005
    Location
    Carlisle, Cumbria
    Posts
    617
    Thank Post
    3
    Thanked 17 Times in 15 Posts
    Rep Power
    22

    Re: Script to delete profile at log off?

    The only problem I can see now is slower logon times if the computer has to create a local user profile everytime someone logs on.

  10. #25

    Join Date
    Nov 2007
    Posts
    554
    Thank Post
    3
    Thanked 3 Times in 3 Posts
    Rep Power
    15
    Quote Originally Posted by ajbritton View Post
    I do the lot. GPO setting + UPHCLEAN + DELPROF /Q /I /R.
    The GPO setting doesnt appear to work for me?

    Does anyone have a guide on how to use delprof & uphclean?
    Or do i literally just wack delprof into netlogin/a share, set it as a log off script with the /q /i /r variables?
    Then install the UPHClean on each workstation?
    Last edited by boomam; 2nd October 2008 at 09:08 AM.

  11. #26

    Join Date
    Feb 2008
    Posts
    5
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    I run this batch file on startup using machine GPO. (Not log off, sorry) Have been doing it for donkeys. We have a user naming convention for all students whereby username starts with year of entry (e.g 08 this year ) leaves the other profiles I want to keep (none student) on the PCs.

    ----------------

    @echo off
    c:
    cd\documents and settings
    for /f %%f IN ('dir /b 03*; dir /b 04*; dir /b 05*; dir /b 06*; dir /b 07*; dir /b 08*; dir /b 09*') DO rd /s /q %%f

    -----------------

  12. Thanks to PaulBedford from:

    Griff (2nd March 2010)

  13. #27

    Join Date
    Sep 2007
    Posts
    90
    Thank Post
    7
    Thanked 32 Times in 17 Posts
    Rep Power
    19
    One really doesn't need to use batch files, delprof, GPO's or commercial utility's,
    the answer is really simple:
    make the users member of the group "Domain Guests" or the local Guests group, and their profiles will be deleted immediatly after logoff automatically.
    This functionality is built-in by design.

    They can still remain in the domain users group too, so it won't affect their rights.

  14. 10 Thanks to rvdmast:

    CraigM (19th October 2009), dhicks (11th October 2008), frosty (16th October 2009), Gibbo (10th February 2010), Griff (9th February 2010), JAB1a (3rd March 2011), jonnykewell1 (15th October 2010), mrbios (16th October 2009), stevef1 (30th October 2009), _Bat_ (9th December 2009)

  15. #28

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,710
    Thank Post
    3,246
    Thanked 1,048 Times in 970 Posts
    Rep Power
    364
    Quote Originally Posted by NetworkGeezer View Post
    kills all known pofiles. dead
    what about unknown ones ? lol

  16. #29

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    Not sure what the policy is but noticed that our Windows 2008 Server/Vista systems are automatically deleting all profiles automatically (at logoff!) - bit annoying at times but great for the kids & teacher accounts and saves me having to run DELPROF at machine boot!

  17. #30
    box_l's Avatar
    Join Date
    May 2007
    Location
    Herefordshire
    Posts
    427
    Thank Post
    68
    Thanked 90 Times in 75 Posts
    Rep Power
    61
    i use this in one of my logon scripts

    Code:
    'function to delete profiles
     Function Delprof()
    	 On Error Resume Next
    	 Dim obtainfolder
    	 Dim Pathfinder
    	 Dim strPath
    
    	 Set fso = CreateObject("Scripting.FileSystemObject")
    
    	 strPath = "C:\Documents and Settings\"
    
    	 userexcludelist = "Administrator,All Users,Default User,localservice,networkservice,"
    	
    	 Set f = fso.GetFolder(strPath)
    
    	 ' Loop through all subfolders
    	 For Each fldrItem in f.SubFolders
    	   fldrName = fldrItem.name
    	   If Right(strPath,1) <> "\" Then
    	     Pathfinder = strPath & "\" & fldrName
    	   Else
    	     Pathfinder = strPath & fldrName
    	   End If
    
    	   If InStr(1, userexcludelist, fldrName, 1) Then
    	    
    	   Else
    	    
    	     set obtainfolder = fso.GetFolder(Pathfinder)
    	     obtainfolder.Delete true
    	   End If
    
    
    
    	 Next
    
    	 ' Clean up objects
    	 Set fso = Nothing
    	 Set fc = Nothing
    just edit the excludelist to allow for profiles you wish to keep.

    but the rules still apply, you cannot delete ones in use.

    this seems to include all the ones used since the machine booted, not just the logged on one.

    BoX

  18. Thanks to box_l from:

    ZeroHour (5th May 2009)

SHARE:
+ Post New Thread
Page 2 of 5 FirstFirst 12345 LastLast

Similar Threads

  1. Script to Delete Profiles - PLEASE HELP
    By Mr_M_Cox in forum Scripts
    Replies: 13
    Last Post: 22nd February 2013, 03:53 PM
  2. Replies: 8
    Last Post: 17th November 2007, 09:04 PM
  3. need a script to delete shortcuts
    By philtomo-25 in forum Scripts
    Replies: 2
    Last Post: 1st November 2007, 03:50 PM
  4. Delete Profile on LogOff
    By roland in forum How do you do....it?
    Replies: 11
    Last Post: 20th September 2007, 09:43 PM
  5. Script to delete printer
    By tosca925 in forum Scripts
    Replies: 2
    Last Post: 31st August 2005, 07:45 PM

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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
  •