Garyd53 Posted May 18, 2009 Posted May 18, 2009 Hi Guys, I want to use delprof to clean off all local profiles in C:\documents and settings on all machines. So i placed delprof.exe in the netlogon share on one of the domain controllers then create a .bat file with this line \\curricsvr2\netlogon\delprof.exe /q /i. I then link the .bat file to an OU under computer configuration as a startup script. Did a gpupdate /force on the client machines, after the machines restarted the policy did not run. Any ideas why delprof did not run? Your answers would be appreciated Thanks
FN-GM Posted May 18, 2009 Posted May 18, 2009 Did you put the batch file with the .exe? What happens when you run it manually?
Garyd53 Posted May 18, 2009 Author Posted May 18, 2009 Yes i have put tcuted he bat file with the exe. when i run the bat file maually it executed fine.
Garyd53 Posted May 18, 2009 Author Posted May 18, 2009 Yes i have put the exe in the bat file, and when run manually it executed fine.
FN-GM Posted May 18, 2009 Posted May 18, 2009 Did you check the path in the group policy. Try creating a new policy just for this script and see what happens
Garyd53 Posted May 18, 2009 Author Posted May 18, 2009 I have created a new policy as well as using an existing policy. It seems to recognise that the policy is there but does not do anything.
FN-GM Posted May 18, 2009 Posted May 18, 2009 Is the computer directly in that OU or is it in a sub OU? Is there anything in the event log on the client.
Garyd53 Posted May 18, 2009 Author Posted May 18, 2009 Yes the computer is directly in the OU that the policy is linked to
FN-GM Posted May 18, 2009 Posted May 18, 2009 have you tried a GP result and what does the event log say?
Garyd53 Posted May 18, 2009 Author Posted May 18, 2009 Will try GP Result and check the logs tomorrow and let you know. Thanks for all your help so far.
Michael Posted May 18, 2009 Posted May 18, 2009 If you enter your code into a logon script, does it run correctly? I am not 100% sure whether delprof can run at computer level.
DrPerceptron Posted May 18, 2009 Posted May 18, 2009 Turn on Displaying scripts I can't remember where the option is without looking... Computer > Administrative Templates > System > Scripts I think that's the correct path (you can also set the maximum wait time in the same branch) There should be an option which when Enabled, shows the prompt window and what the script is currently up-to. if nothing happens, you might have to add a pause in so you can see..... Not 100% sure but, can delprof even be run from a network location? I rolled it out through a batch file to the C:\ drive of all the PC's and run it from there....
FN-GM Posted May 18, 2009 Posted May 18, 2009 If you enter your code into a logon script, does it run correctly? I am not 100% sure whether delprof can run at computer level. I didnt think it can run at login because some user accounts will be locked?
Michael Posted May 18, 2009 Posted May 18, 2009 I didnt think it can run at login because some user accounts will be locked? Very true, but it'll just skip them as the files will be in use. Alternatively you could use the X number of days inactive option. 1
NeoPlosive Posted May 18, 2009 Posted May 18, 2009 Try this? Remove all profiles from XP on startup - Schooltechnician.co.uk 1
Garyd53 Posted May 23, 2009 Author Posted May 23, 2009 Guys thanks for all your reply's what i realise is that delprof seems to work now and again will try that script from NeoPlosive. Cheers
mcloum Posted May 26, 2009 Posted May 26, 2009 I just use a batch file from my laptop with a line for each machine in a room as delprof supports remote deleting of profiles something like "delprof.exe \\" not at work today and dont have access to it but seems to work well, i just set off a batch file for each room and leave it over night.
Garyd53 Posted May 30, 2009 Author Posted May 30, 2009 Thanks for all the input it, delprof seems to work now and again i will try NeoPlosive script
adamchapman Posted May 31, 2009 Posted May 31, 2009 I use a VB script as a startup script to run delprof from a network share, then run a script to clean up anything that delprof has missed I tried running as a logoff script, but it seems to work far better as startup script.
mac_shinobi Posted May 31, 2009 Posted May 31, 2009 Delete Local Profiles (VBScript) A neater version as per above - obviously you can add your own exceptions within the isexception function
srochford Posted May 31, 2009 Posted May 31, 2009 I didnt think it can run at login because some user accounts will be locked? It can be run at login but it won't delete anything - it's going to run with the rights of the logged in user and (unless you make all your users local admins) they won't be able to delete anything!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now