+ Post New Thread
Page 3 of 5 FirstFirst 12345 LastLast
Results 31 to 45 of 75
Windows Thread, Script to delete profile at log off? in Technical; Here's another method that also doesn't need batch files, delprof, GPO's or commercial utility's, but i haven't verified this method ...
  1. #31

    Join Date
    Sep 2007
    Posts
    90
    Thank Post
    7
    Thanked 32 Times in 17 Posts
    Rep Power
    20
    Here's another method that also doesn't need batch files, delprof, GPO's or commercial utility's, but i haven't verified this method myself:
    If you want cached profiles to be deleted automatically, add a REG_DWORD value named DeleteRoamingCache to HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\W inlogon. Give it a value of 1 to enable removal, or 0 to allow cached profiles to stay around.

  2. #32
    frosty's Avatar
    Join Date
    May 2007
    Location
    East Sussex
    Posts
    121
    Thank Post
    13
    Thanked 10 Times in 10 Posts
    Rep Power
    17
    Quote Originally Posted by rvdmast View Post
    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.
    Trawling through this site stumbled across this and it works like dream - thanks

  3. #33
    mrbios's Avatar
    Join Date
    Jun 2007
    Location
    Stroud, Gloucestershire
    Posts
    2,546
    Thank Post
    363
    Thanked 264 Times in 216 Posts
    Rep Power
    101
    Quote Originally Posted by rvdmast View Post
    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.
    The most useful piece of information i've found by accident in a long long long long time!

  4. #34

    Join Date
    Mar 2008
    Location
    Cape Town
    Posts
    111
    Thank Post
    8
    Thanked 14 Times in 14 Posts
    Rep Power
    16
    Quote Originally Posted by rvdmast View Post
    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.
    I'm going to test this first chance I get, as this would be incredibly useful to avoid clutter on the local computers. This is something the Zenworks client does at the moment, but as we moving away from Netware next year, I needed something to do the same function.

  5. #35
    mrbios's Avatar
    Join Date
    Jun 2007
    Location
    Stroud, Gloucestershire
    Posts
    2,546
    Thank Post
    363
    Thanked 264 Times in 216 Posts
    Rep Power
    101
    I've only come across one issue during testing so far, when a user logs out it removes the profile, then 10seconds later it reappears but the only thing that is in there is "local settings > application data" and it's empty, the next time that same user logs in it creates a folder "user.DOMAIN" (where the username is user and your domain is domain etc) and when the user then logs out that folder is removed completely but still leaving the original empty user folder

    Anyone come across this yet? not much of a problem as it's only 0 bytes but would be nice to have it gone

  6. #36

    Join Date
    Jan 2010
    Location
    Bromley
    Posts
    1
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Hi There is it possible to grab a copy of the script from you.

  7. #37
    Griff's Avatar
    Join Date
    Feb 2009
    Location
    Bedfordshire
    Posts
    519
    Thank Post
    204
    Thanked 95 Times in 77 Posts
    Rep Power
    38
    Quote Originally Posted by rvdmast View Post
    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.
    This is brilliant thanks a lot!!

  8. #38
    Chad's Avatar
    Join Date
    May 2007
    Location
    Elgin
    Posts
    74
    Thank Post
    5
    Thanked 20 Times in 19 Posts
    Rep Power
    18
    Quote Originally Posted by mrbios View Post
    Anyone come across this yet? not much of a problem as it's only 0 bytes but would be nice to have it gone
    I'm seeing this exact issue, sometimes there's an index.dat file left behind too which is locked, but usually I see empty profile folders amassing with an increment in the numeric suffix each time.

    I've got a GPO setting to delete the temp IE files, not sure if this and the profile removal are clashing or if it's something else...

  9. #39

    Join Date
    Dec 2009
    Location
    Union Gap, WA
    Posts
    2
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I recently started using script written by Joe Shonk to replace the function of the Delprof.exe tool and so far am happy to report it works like a charm. It allows a lot of customization, which is nice.

    Here is the link to the script with all the details and instructions
    The Shonk Project - Delete Profiles Script v1.9

    Here is a link that describes a good way to use this script locally if you don't use active directory
    J House Consulting / Script to replace Delprof.exe


    I use Active Directory and run the deleteprofiles.vbs script at the machine startup via Group Policy and I also use Microsoft's UPHClean to ensure all users profiles are unloaded just in case.

    Overall this method has worked best for me.

  10. #40
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,207
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    Quote Originally Posted by Tsilver View Post
    I recently started using script written by Joe Shonk to replace the function of the Delprof.exe tool and so far am happy to report it works like a charm. It allows a lot of customization, which is nice.

    Here is the link to the script with all the details and instructions
    The Shonk Project - Delete Profiles Script v1.9

    Here is a link that describes a good way to use this script locally if you don't use active directory
    J House Consulting / Script to replace Delprof.exe


    I use Active Directory and run the deleteprofiles.vbs script at the machine startup via Group Policy and I also use Microsoft's UPHClean to ensure all users profiles are unloaded just in case.

    Overall this method has worked best for me.


    I'm having a play with the Shonk script at the moment but I can't get it to run as a startup script, i've got a .bat file in netlogon along with the .vb file. I can run it by pasting the command in to the cmd prompt or by double clicking it.

    This is the command that i'm running. Should I need to call it from a .bat file or am I barking up the wrong tree?

    Code:
    cscript.exe  %logonserver%\NETLOGON\DeleteProfiles.vbs /E root,libraryuser /D 2 /R /L C:\delprof.log
    Thanks.

    p.s I know i've got the read only switch set

  11. #41
    frosty's Avatar
    Join Date
    May 2007
    Location
    East Sussex
    Posts
    121
    Thank Post
    13
    Thanked 10 Times in 10 Posts
    Rep Power
    17
    I had an issue like this once and it turned out to be the permissions on the .bat itself! - maybe worth a check?

  12. #42
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,207
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    Quote Originally Posted by frosty View Post
    I had an issue like this once and it turned out to be the permissions on the .bat itself! - maybe worth a check?

    I think i've just sorted it. The %logonserver% variable doesn't seem to work in a startup script I put a server name in and it runs file now.


    EDIT

    Ah i've remembered now. \\domainname\netlogon works and it picks a random DC
    Last edited by cookie_monster; 2nd March 2010 at 09:23 AM.

  13. #43

    Join Date
    Dec 2007
    Posts
    52
    Thank Post
    2
    Thanked 2 Times in 2 Posts
    Rep Power
    14
    You may find that the GPO to delete cached profiles will not work if for instance a child pulls the power from a computer when they are still logged on.

  14. #44
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,207
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    Is anyone using the Shonk Delete Profiles Script v1.9?

    I've been trying it and every part seems to work well except the delete part (shame that). I've set it to log and it runs through the reghives then selects profiles that can be deleted it then says "Deleting Orphaned Profile Directory: C:\Documents and Settings\USERNAME" in the log but when I check the folder is still there. I can manually delete the folder so it doesn't seem to be a permissions issue.

  15. #45
    pwds's Avatar
    Join Date
    Dec 2008
    Location
    Derby
    Posts
    279
    Thank Post
    73
    Thanked 48 Times in 38 Posts
    Rep Power
    20
    If you're running this as a logon/logoff script then it will run with the permissions of the user account.

    In that case it's much better to run it as a startup or shutdown script (we do shutdown) as that will run with system account permissions.

    Sorry if this is stating the obvious.

SHARE:
+ Post New Thread
Page 3 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 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
  •