I wrote a tool many years ago to clear the icon cache on Vista and it still works well for me on Windows 10:
(Beware that some garbage anti-virus tools think it is a virus and/or block it from working, despite it coming with source code, not doing anything strange and not changing in 10 years. But that's a reason to replace bad anti-virus with something better. I've given up reporting the false-positive to the bad anti-virus vendors after having to do it more than once for the same vendor.)
The scripting API has a delay function you can use. There isn't anything built-in for simple non-scripting commands, although there are various kludges people use for .bat files which can be used. I'd go with the scripting method since it's more explicit and not much extra typing.