Need to DELETE folder(s) during the XP startup

I am using Micorosofts Steady state program to keep users from changing anything on their PCs. This works well most of the time, except during a crash or improper shutdown. The application leaves a "Copy" of the profile in the Documents and settings folder. This causes the user not to be able to log in because there is already a user profile there. I can write a CMD/BAT file to remove them however i need to know how to execute that before XP loads as the user will not have permission to do this. It could run on every restart reguardless of if it needs to or not.
Wdntulk2no-Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

johnb6767Commented:
how about a Shutdown script?
0
Wdntulk2no-Author Commented:
The problem is cause by imporper log off / shutdown. They cannot log back in to log off properly. So i dont thing that would work in this case.
0
johnb6767Commented:
Machine startup script then..... It will launch it before userinit/explorer starts, so there is no chance of the profile being locked.....
0
Wdntulk2no-Author Commented:
OK so the next question is how? I havent done this before.
0
acl-puzzCommented:
here is how to set up an  script on start up

http://www.tutorial5.com/content/view/157/47/ 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows XP

From novice to tech pro — start learning today.