View Single Post
Old 28th June 2010, 17:38   #5
nsnb
Senior Member
 
Join Date: Jul 2008
Posts: 157
Lightbulb

Quote:
Originally Posted by nsnb View Post
so I wonder what types of workarounds can I come up with? Perhaps placing a delay of several hundreds milliseconds?
Answering myself: Sleep() is ugly (in any programming language...), so I took the asynchronous approach: Right after the RMDir $MUI_TEMP line I check for errors:
PHP Code:
RMDir $MUI_TEMP
IfErrors L_SM_ERROR
...
...
...
L_SM_ERROR:
MessageBox MB_OK|MB_ICONEXCLAMATION "Error in RMDir $MUI_TEMP." 
It turns out that by mere checking for the error, it never occurs anymore... (the message box is never displayed and the entire Start Menu entry is removed cleanly just as it used to be).

Suggests a timing problem?
nsnb is offline   Reply With Quote