Delete File At Login for Network Users

Hi Guys,
I have Windows Server 2008 with several clients (win vista/win 7). They all use an application stored on the server which has recently been updated and the icon has changed but this icon change hasnt reflected on all the clients and I assume this is icon cache.
I wish to have a login script that will occur only once and delete the %userprofile%\AppData\Local\IconCache.db file

How do I do this?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

I think the best you can do for this time and it will work with you for future is to use GPO  login scripts
(but you should verify cache file creation date so it will not delete new ones as will :)
Since you are on 08, use Group Policy Preferences on the user policy to delete the file. You can set it to run once and not run again.
osirionAuthor Commented:
Sorry guys, I have no idea on how to do this - can you give me specifics please?
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

yo_beeDirector of Information TechnologyCommented:
Pretty straight forward:
Create a new GPO (i.e. Firm-Remove Network Files)
Once created add the variables that you wish to add, update, replace or delete.
To do so expand the User Configuration Node > Preferences Node > Windows Settings Node >Files

To create a removal of a file or files you will need to create a Delete Object  in the Files Node.

Right click in the empty space and select New > File >

Click the Drop Down and select Delete

Click in the Destination field and press F3 to bring up a environmental variable list and select AppDataDir.  Once select add the remaining part of the path
(ie %AppDataDir%\Local\IconCache.db)
To have it run once click on the Common Tab and select Run logged-on user's security context and Apply once and do not reapply. If you want to isolate you and choice Item Level Targeting (ILT) to a plethora of values.

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
osirionAuthor Commented:
Wow, great answer!
yo_beeDirector of Information TechnologyCommented:
No Problem, but I think you should share some points with the others for the time, effort and suggestions. (ie BelushiLomax)
He/she offered up the GPP suggestion.  I added by giving the details.
I would put a request for assistance and reallocate the the points has you see fit.
yo_beeDirector of Information TechnologyCommented:
Also you can accomplish alot with GPP that used to be done with many hours of custom scripting.

This can be applied to windows XP machines as well if you install CSE (Client Side Extension) as long as you have a windows 7 machine with RSAT installed.


So I get no credit for actually suggesting the fix?
yo_beeDirector of Information TechnologyCommented:
That is what I recommend the Asker to do.
Ask for assistance and re-distribute the points as he/she feels fit.
Thanks yo_bee...I'm not trying to "be that way" as your documentation was terriffic, I'm just trying to get my points, ya know?
yo_beeDirector of Information TechnologyCommented:
I said it before you even said anything. Look up a few comments.

I am in agreement with you.
I did and again, thanks for being straight up...good guy
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 Server 2008

From novice to tech pro — start learning today.