+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
Scripts Thread, Deletion of local profiles on xp. in Coding and Web Development; If I figured out how to use UNC paths and such like in vbs Erm you just use them I ...
  1. #16

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,328
    Thank Post
    622
    Thanked 1,577 Times in 1,414 Posts
    Rep Power
    413

    Re: Deletion of local profiles on xp.

    If I figured out how to use UNC paths and such like in vbs
    Erm you just use them I have lots of vbs with unc paths in.

    Ben

  2. #17
    chrbb's Avatar
    Join Date
    Oct 2005
    Location
    Midlands
    Posts
    1,507
    Thank Post
    141
    Thanked 67 Times in 62 Posts
    Rep Power
    46

    Re: Deletion of local profiles on xp.

    sorry really silly question here but would deleting the local profiles delete all in that profile's 'my documents'?

  3. #18

    Join Date
    Sep 2006
    Location
    Essex
    Posts
    777
    Thank Post
    1
    Thanked 31 Times in 29 Posts
    Rep Power
    23

    Re: Deletion of local profiles on xp.

    Not a silly question but the answer is yes, that is one of the reasons why we redirect users My Documents folders to a file server.

  4. #19
    chrbb's Avatar
    Join Date
    Oct 2005
    Location
    Midlands
    Posts
    1,507
    Thank Post
    141
    Thanked 67 Times in 62 Posts
    Rep Power
    46

    Re: Deletion of local profiles on xp.

    None of our users save to 'my docs' but to their drive on network, but ... teachers save onto their laptops at home then save anything they can't afford to lose to their network share (in theory), so if this was applied to all users via gpo would their docs be deleted as well?

  5. #20

    Join Date
    Feb 2006
    Posts
    1,187
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Deletion of local profiles on xp.

    Quote Originally Posted by chrbb
    None of our users save to 'my docs' but to their drive on network, but ... teachers save onto their laptops at home then save anything they can't afford to lose to their network share (in theory), so if this was applied to all users via gpo would their docs be deleted as well?
    This should be a problem if the GPO is a loop back on an OU for student PCs or if the script is run as a scheduled job on each of the machines.
    Either way you can determine which macines to ignore.

  6. #21

    Join Date
    Feb 2006
    Posts
    1,187
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Deletion of local profiles on xp.

    Quote Originally Posted by djm968
    Delprof will delete all user profiles but you could copy the profiles you want keep somewhere and bring them back in after you run delprof

    Something like this:

    XCOPY /S "C:\Documents and Settings\%userprofile%" "C:\ProfileBackupFolder\%userprofile%"

    DELPROF /Q /I

    XCOPY /S "C:\ProfileBackupFolder\%userprofile%" "C:\Documents and Settings\%userprofile%"
    How about just using the MOVE command. This works folders so longs as you don't try to jump across drive/partition boundary.

    It will be quicker than XCOPY as it just involves changes to the file table rather than copying whole files. Besides I think you would need the /H switch or else it wouldn't copy the user hive which is normally hidden.

    Delprof will not touch any other folders in the "C:\Documents and Settings" folders, such as "All Users", "Default User, "LocalService" and
    "NetworkService", it will only delete "real" user profiles.

    If you wanted to be really fancy you could get the SID prefix of the group users you want to delete then search for the corresponging paths in the profilepath key in HKLM.

  7. #22
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24

    Re: Deletion of local profiles on xp.

    I have never used delprof befor i have just downloaded it (its a msi) so what do i do deploy it via gpo then run a bat file with DELPROF /Q /I
    and run this at shutdown but what i would like to do is a sync befor this happens any idears.

  8. #23

    Join Date
    Feb 2006
    Posts
    1,187
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Deletion of local profiles on xp.

    If they're removing profiles then they should have been synced at logoff.

    Could you explain what you mean by syncing?

  9. #24
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24

    Re: Deletion of local profiles on xp.

    ie i want sync offline files befor deleting profiles as part of a switch off routine. The ideal thing woluld be if it was unable to sync the dont run delprof but if it does then run delprof but dont know how to do it.

  10. #25
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24

    Re: Deletion of local profiles on xp.

    ok something like this

    mobsync
    if mobsync = fail goto end
    elseif delprof or something like that

  11. #26
    alonebfg's Avatar
    Join Date
    Aug 2006
    Location
    south west some of the time
    Posts
    834
    Thank Post
    12
    Thanked 34 Times in 21 Posts
    Blog Entries
    5
    Rep Power
    24

    Re: Deletion of local profiles on xp.

    Its ok i have it sorted i will run a bat at logoff somthing like this
    delprof /q /i /d:7
    and this means that if they do not log in on that pc for 7 days it will delete the profile will deploy the delprof to all pcs and this means if the profile is not active for 7 days when they log off all profiles for 7 days will be deleted. I just need to ask one question( i should know the answer but i forgot) If a user roaming user logs onto a pc offline does it still run scripts I cant rember if Romaing pc cache Scripts ??

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

Similar Threads

  1. Deleting Local Profiles
    By Mr_M_Cox in forum Windows
    Replies: 43
    Last Post: 17th March 2009, 02:02 PM
  2. Replies: 8
    Last Post: 30th October 2007, 02:13 PM
  3. Local admins and Mandatory Profiles
    By Bobo in forum Windows
    Replies: 21
    Last Post: 2nd April 2007, 03:02 PM
  4. Replies: 17
    Last Post: 14th December 2006, 01:52 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
  •