LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Executable icon doesn't update when .ico file is changed

I'm having a similar problem to this thread, but with my executable file.

 

I have a project in LabWindows 2015 SP1 using Windows 7 Pro.  I created an icon file and set my project to use it by selecting Build -> Target Settings -> Application icon file with Configuration set to "All Configurations".  Later I created a different icon file and changed the target settings to use the new file. 

 

When I build my application, I'm seeing something strange.  The icon that shows up in my Windows folder for the application is the old one, and if I create a shortcut to the application on my desktop, I get the old icon.  But when I run the program, the icon in the upper left corner of my main panel is the new one, and so is the one that appears in the taskbar.

 

I tried the solution suggested in the original thread (deleting the cvibuild.xxx folder), but it didn't help. 

 

I did find another solution -- renaming either the executable file or the folder containing it to any other name causes the icon to change to the correct one.  So this isn't a big problem, but I thought I should report it anyway since the behavior doesn't seem right.

 

If I subsequently rename the file or folder back to the original name, the icon reverts to the old one.

0 Kudos
Message 1 of 5
(6,574 Views)

Hi richferrara,

 

Thanks for reporting this issue. This is a known issue with LabWindows which is mentioned in the LabWindows™/CVI™ 2015 Known Issues. Please try the instructions in the KnowledgeBase article below to see if it works for your executable for another workaround.

 

Josh

Applications Engineer

National Instruments 

Message 2 of 5
(6,522 Views)

I tried changing my icon file and following the instructions in your link, but it didn't work.  My application still showed the old icon when I navigated to it in Windows.

0 Kudos
Message 3 of 5
(6,503 Views)

Did you try the method in the linked Windows Club link? 

 

There is also another way to do it, should the above method not work for you:

Kill Explorer.exe process. In Windows 7, click Start button > Hold down Ctrl+Shift & Right Click on an empty area in the Start Menu > Click “Exit Explorer”.

 

Open the command prompt window, type each of the following and after every command, hit the Enter button:

cd /d %userprofile%\AppData\Local
attrib –h IconCache.db
del IconCache.db
start explorer

0 Kudos
Message 4 of 5
(6,479 Views)

Once I click "exit explorer", how do I bring up a command prompt window?  The start menu is no longer accessible.

0 Kudos
Message 5 of 5
(6,474 Views)