custom File function
i'm having a problem over-writing certain files that are in use upon updating my software. the script ensures that all running applications and services are stopped, but certain dlls are not always unloaded in a timely fashion.
i solved this in the uninstall by writing a custom delete file macro that attempted to delete the file for a specified duration before giving up. it essentially checks for errors and keeps trying again until the timeout has been reached or the file has been successfully deleted.
i want to do the same thing for file copying because the problem is essentially the same: dll files are still in use and cannot be over-written. but i cannot write a custom File copying function because of the dual nature of the File instruction. i want to pass it a run-time variable but a compile-time constant.
does anyone know how i could do this without having ugly cluttered code around each File instruction?