Little-Miss (16th September 2009)
I have a .vbs that runs at startup will post it tommorow when I get in, I looked at delprof.exe but for whatever reason decided to go for the .vbs file.
You will have to remove it on all the machines she logged onto whilst this has been effecting her... sucks I know.
With students we used to just clear it off there current machine and hope they don't logon to another machine that is carrying the bad profile, which if they reported it stright away should only be the current machine...
Right, i emptied her profile on the server, and removed her profile from one of the affected computers and it now works so i suspect it was a corrupt profile.
So then, if i find a script to remove profiles this will help to stop this happening?
However, as far as prevention is concerned, it boils down to educating your users to logoff and crossing your fingers that it doesn't 'just happen' (it got me this morning )
When sorting out the profile on the server, don't just delete the corrupt one.
Rename it to OLD or whatever.
Get the user has logged on (which creates a new profile) and then log off (and the profile is saved back to the server).
You can then copy favourites over from the stuffed profile to the new and any extra desktop icons... you may redirect both, in which case you don't need to do this before deleting the corrupt profile. users like this!
As a startup script, works for us and leaves the folders that we don't want it touch. It has to be a startup script because when a user logs on some of there profile files get locked for the duration that machine is on, hence you wouldn't be able to delete it after they have logged off or when shutting down.Code:ON ERROR RESUME NEXT ' Clears user profiles on computer startup ' leaves the following folders ' Administrator ' RM Default User ' Default User ' All Users ' ClassMate ' Reference : http://msdn2.microsoft.com/en-us/library/9kcx47hd.aspx dim oktodelete, fso, f, foldercollection set fso = CreateObject("Scripting.FileSystemObject") set f = fso.getfolder("C:\Documents and Settings") set foldercollection = f.subfolders for each folder in foldercollection oktodelete = true if instr(1, folder.path, "Administrator") then oktodelete = false end if if instr(1, folder.path, "RM Default User") then oktodelete = false end if if instr(1, folder.path, "Default User") then oktodelete = false end if if instr(1, folder.path, "All Users") then oktodelete = false end if if instr(1, folder.path, "ClassMate") then oktodelete = false end if if instr(1, folder.path, "LocalService") then oktodelete = false end if if instr(1, folder.path, "NetworkService") then oktodelete = false end if if oktodelete then 'wscript.echo "Deleting Folder : " & folder.path fso.deletefolder folder.path, true end if next
It won't stop it happening (I think thats an advantage of madatory profiles), but it will mean the fix is just clearing there profile on the server (ensuring there not logged on anywhere before hand)
Last edited by mossj; 16th September 2009 at 10:48 AM.
Right, bear with me here. There is somewhere to put startup/shutdown scripts isnt there....where do i find it...
Make sure you put the .vbs in a share accessable by all (I assume it has to be all) I put mine in the netlogon share ""\\domain\netlogon"
on your DC (I assume it has to be your dc) go to start>admin tools>gpo management
Open up your forest , then domain, then your actual domain, then right click on group policy objects and click new.
Enter a name for the object i.e "cleanprofiles", then find it and right click>edit
It should open up the group policy management editor
go to Computer config>policies>windows settings> scripts. right click on startup and go to properties.
Click add and browse to the UNC share (don't use IP addresses (use servernames instead), it mucks it up for us)
Ok everything and close the Group policy management editor.
In group policy management you will need to link to the ou's of the computers you want to clean. so right click on the OU's and click 'link existing gpo'. Select the gpo and click ok.
Open up command prompt on the server and type "gpupdate /force", if it asks you if you want to logoff users hit "n" for no.
That should be that wait a 15 mins or so for the computers to start picking it up and you should be all good.
you're a star mossj!!
well that script works perfectly.
I cant decide what to do though..i know its not a big deal, but using that script means that everytime a user logs on to a computer, maybe on they use everyday, its has to go through that whole thing with that box in the top left corner. I know that takes about 30 seconds, but i imagine it may be a little irritating...fussy i know...
Can't you set it to run when they log off?
Trouble is many of the profiles won't delete until the machine has been rebooted, so it's better to do it on Startup (Not Logon)
Do yours do that everytime Elsie?
You should be EXTREMELY careful including delprof or any script based methods of deleting profiles at logoff. Remember teachers may typically logon to their laptops on the domain, and this would delete their local profile and their documents!
Yup, was aware of that!
I've done it by OU, and at the mo none of the laptops are on the domain but when they are they will go into their own OU and i shall be very careful where i apply the script!!
Am i better doing this manually when there is a problem or what? If so that sucks
I would do it manually as and when required. I wouldn't recommend scripting it. You're then in full control.
There are currently 1 users browsing this thread. (0 members and 1 guests)