qwertyandy
29th August 2002 00:38 UTC
file copy failed
RMDir /r $INSTDIR
;Sleep 1000
CreateDirectory $INSTDIR
CopyFiles $5\*.* $INSTDIR
if there is an explorer window open for $INSTDIR, the file copy will fail without the pause, because the script continues, when windows is still closing out the window, and the directory creation, and file copy are not allowed.
kichik
29th August 2002 11:10 UTC
How would you suggest to fix this? How can one search for an open window of the directory he deletes?
Sunjammer
29th August 2002 11:41 UTC
Does CopyFiles know that it failed?
qwertyandy
29th August 2002 18:19 UTC
it says that the file copy failed in the status part.
this change seems to fix it
FindWindow $4 "" $INSTDIR
SendMessage $4 ${WM_SYSCOMMAND} 0xF060 0
Sleep 5000
RMDir /r $INSTDIR
copyfiles:
CreateDirectory $INSTDIR
CopyFiles $5\*.* $INSTDIR
kichik
29th August 2002 18:50 UTC
It works for me without any changes. What OS are you using? What version of NSIS?
qwertyandy
29th August 2002 18:53 UTC
windows 2000 nsis 1.98. i have found that it acts differently depending on how fast the computer is.
kichik
29th August 2002 19:00 UTC
Must be some Micrsoft bug... How about just deleting the contents of the directory or not opening it in explorer at all?
qwertyandy
29th August 2002 19:07 UTC
i was opening the directory so that the user could verify the deletion of the directory. what i have seems to be working okay.