Solved

Delete File At Login for Network Users

Posted on 2012-04-06
12
645 Views
Last Modified: 2012-06-27
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?

Thanks!
0
Comment
Question by:osirion
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 12

Expert Comment

by:FarWest
ID: 37817802
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 :)
0
 
LVL 7

Expert Comment

by:BelushiLomax
ID: 37817934
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.
0
 

Author Comment

by:osirion
ID: 37818415
Sorry guys, I have no idea on how to do this - can you give me specifics please?
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 23

Accepted Solution

by:
yo_bee earned 500 total points
ID: 37819166
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

GPP1
GPP2
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 >

GPP3
Click the Drop Down and select Delete

GPP4
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)
GPP5
GPP8
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.
gpp6GPP7
0
 

Author Closing Comment

by:osirion
ID: 37819187
Wow, great answer!
0
 
LVL 23

Expert Comment

by:yo_bee
ID: 37819198
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.
0
 
LVL 23

Expert Comment

by:yo_bee
ID: 37819207
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.

CSE
http://msdn.microsoft.com/en-us/library/windows/desktop/aa373488(v=vs.85).aspx

RSAT
http://www.microsoft.com/download/en/details.aspx?id=7887
0
 
LVL 7

Expert Comment

by:BelushiLomax
ID: 37819223
So I get no credit for actually suggesting the fix?
0
 
LVL 23

Expert Comment

by:yo_bee
ID: 37819226
That is what I recommend the Asker to do.
Ask for assistance and re-distribute the points as he/she feels fit.
0
 
LVL 7

Expert Comment

by:BelushiLomax
ID: 37821104
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?
0
 
LVL 23

Expert Comment

by:yo_bee
ID: 37821116
I said it before you even said anything. Look up a few comments.

I am in agreement with you.
0
 
LVL 7

Expert Comment

by:BelushiLomax
ID: 37827767
I did and again, thanks for being straight up...good guy
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question