+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 25 of 25
Windows Thread, Batch File Needed??- Profile Problem in Technical; Originally Posted by browolf we use c:\> For /f %a in ('net view ^| find "<prefix>" /i') do delprof /c:%a ...
  1. #16
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,217
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    75
    Quote Originally Posted by browolf View Post
    we use

    c:\> For /f %a in ('net view ^| find "<prefix>" /i') do delprof /c:%a /q /i


    Can you describe what it's doing there? I've read that there's a way to use a text file to list PC's that you want it to clear profiles on and exclude certain profiles. Is this the case?

    Thanks.

    EDIT

    Think i've found a good link.

    http://www.ozzu.com/mswindows-forum/...ol-t83230.html
    Last edited by cookie_monster; 27th February 2010 at 03:27 PM.

  2. #17
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,540
    Thank Post
    112
    Thanked 89 Times in 75 Posts
    Blog Entries
    47
    Rep Power
    41
    a for loop allows you to perform an operation on each item in a list. how the list is created occurs inside the brackets. we search the network for specific name prefixes, or you could also echo a txt file with the type command.

    the best reference site for dos comands is SS64.com Command line reference

    I don't know anything about excluding certain profiles, however with find there's an exclusion switch ( /v) and you can repeat piped exclusions ( | find /v ... | find /v ... etc)

    it seems plausible if you were to delete profiles with with just del or rd, that you could do

    for "get a list a list of computers" do
    -----for "get a list of profiles for that computer excluding ones you dont want" do
    ----------del the profiles in the resulting list.

  3. #18
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,217
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    75
    Ok so does delprof leave certain profiles by default e.g. All Users, Administrator etc?

  4. #19
    round2it's Avatar
    Join Date
    May 2009
    Location
    UK
    Posts
    1,084
    Thank Post
    255
    Thanked 160 Times in 116 Posts
    Rep Power
    41
    Quote Originally Posted by cookie_monster View Post
    Ok so does delprof leave certain profiles by default e.g. All Users, Administrator etc?
    yes it does

    It'll leave All Users, Default User and Administrator alone.

    if i remember correctly

    waiting to be flamed now............

    just download the latest one from MS
    Last edited by round2it; 27th February 2010 at 07:26 PM.

  5. #20

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    10,044
    Thank Post
    3,579
    Thanked 1,119 Times in 1,024 Posts
    Rep Power
    377
    Quote Originally Posted by round2it View Post
    yes it does

    It'll leave All Users, Default User and Administrator alone.

    if i remember correctly

    waiting to be flamed now............

    just download the latest one from MS
    yeah basically - think there are one or two other ones it leaves alone as well ( default user and something else - cant remember as not used xp properly for a while )

  6. #21
    round2it's Avatar
    Join Date
    May 2009
    Location
    UK
    Posts
    1,084
    Thank Post
    255
    Thanked 160 Times in 116 Posts
    Rep Power
    41
    Quote Originally Posted by mac_shinobi View Post
    yeah basically - think there are one or two other ones it leaves alone as well ( default user and something else - cant remember as not used xp properly for a while )
    i can not remember what the other one was either

  7. #22
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,217
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    75
    There's a couple of hidden ones like 'Network Service' and another I think.

  8. #23
    round2it's Avatar
    Join Date
    May 2009
    Location
    UK
    Posts
    1,084
    Thank Post
    255
    Thanked 160 Times in 116 Posts
    Rep Power
    41
    yes thats right

  9. #24
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,217
    Thank Post
    394
    Thanked 278 Times in 239 Posts
    Rep Power
    75
    Is there an option to set delprof to log what it's done?

  10. #25
    eean's Avatar
    Join Date
    May 2006
    Location
    Seoul
    Posts
    572
    Thank Post
    71
    Thanked 57 Times in 41 Posts
    Rep Power
    31
    Anyone found a proper solution to this problem?

    Summary of problem:
    The problem occurs when a user with a mandatory roaming profile logs onto a website that generates a really long file name (e.g. many of the BBC games). Even though that file does not exist on the server copy of the profile, windows thinks it's copying it to the local machine and this causes a Windows to throw a hissy fit because the file's too long.

    Sort of solution
    There are various workarounds (many of which don't work) basically involving delprof/script deleting the profile on shutdown. I've added my users to the Domain Guests group, which causes their profile to be deleted on logoff. This seems to work most of the time however, the problem still occurs. It's often enough still be annoying.

    I think it might not work when the user visits a problem site and there is an ungraceful shutdown – so the profile is not getting deleted.

    I could spend half a day faffing about with Delprof and startup scripts but if anyone’s got a combination that works, that’d be really appreciated.

    Why the hell hasn’t Microsoft fixed this? It’s clearly a bug and I’ve never had it until IE8.

    Eean is off to consider Firefox!



SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Batch file to copy user profile
    By googlemad in forum Windows
    Replies: 2
    Last Post: 16th October 2010, 12:08 AM
  2. Batch File (select random file) help
    By fil_b in forum Windows Server 2000/2003
    Replies: 5
    Last Post: 5th November 2009, 05:13 AM
  3. batch to bash rewrite help needed please
    By RabbieBurns in forum Scripts
    Replies: 4
    Last Post: 22nd September 2008, 10:05 AM
  4. batch file comman
    By jussy65 in forum Scripts
    Replies: 3
    Last Post: 13th August 2008, 08:10 AM
  5. batch file help
    By beeswax in forum Scripts
    Replies: 9
    Last Post: 3rd March 2006, 08:48 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
  •