Icon changes to old one when filename matches old one

1

I'm using Vista Home Premium x64.

I wrote a program in Visual Studio 2008 I put it on my desktop.

Then, I deleted the program and changed the icon in Visual Studio and recompiled it.

Then I moved the program with the new icon from the output folder in Visual Studio onto my desktop.

The icon changed back to the old one. When I renamed the file, the icon changed to the new one again.

Why is this? (My hunch is that this is related to the search/indexing service...)

EDIT:

Ganesh's solution did not work...

EDIT 2:

How can I fix the icon(s)? In Diago's words: "How can I stop this from happening?"

Moshe

Posted 2010-02-01T06:04:16.640

Reputation: 5 474

Please provide a more specific question. I am not sure if your asking for why it is happening or to stop it from happening? Bounty removed. – BinaryMisfit – 2010-02-08T10:24:40.997

@Diago - Why is this not a specific question? – Moshe – 2010-02-08T14:44:25.197

My comments explains. WHat exactly are you asking, why it is happening, or how to stop it from happening? The first is not a specific question and will be closed, the second is acceptable but then it needs to be explained in the question. – BinaryMisfit – 2010-02-08T16:30:15.687

@Diago- better? – Moshe – 2010-02-09T13:42:00.573

Answers

2

Why is this? (My hunch is that this is related to the search/indexing service...)

It's because Explorer caches the icons for performance reasons and fails to figure out you've changed it. Been there... quite annoying.

I haven't found a reliable way to clear the cache - incidentally, you didn't state whether this is what you actually wanted to ask ;)

RomanSt

Posted 2010-02-01T06:04:16.640

Reputation: 7 830

2

Try rebuilding the Windows Explorer Icon Cache Procedure here.

Ganesh R.

Posted 2010-02-01T06:04:16.640

Reputation: 4 869

Didn't work. The author of that article said that his method may require multiple restarts - not something I call reliable. I tried it though. Thanks. +1 for effort. – Moshe – 2010-02-02T13:29:52.000

0

I was able to replicate this problem on Vista Ultimate x64 SP2. Changing the desktop mode to 16- and then back to 32-bit fixed it immediately (no restart or logging off required).

efotinis

Posted 2010-02-01T06:04:16.640

Reputation: 3 524