Is there any way in C# to refresh the windows icon cache without needing to restart explorer.
As of now, In my existing application I am using the following logic to refresh the icon cache in Window 10. I am executing this logic when taskbar shortcuts are upgraded or downgraded.
[DllImport("msvcrt.dll")]
public static extern int system(string format);
system("ie4uinit.exe -show");
This logic fails to refresh the shortcuts at occasions when the icon cache DB is full. Are there any ways in C# to achieve this with 100% success without needing to restart explorer ?
P.S : I do not want to opt for the .bat file solution for this problem due to compliance reasons.