I’m having two file locking problems, and I’m not quite sure how these are occuring within FB.
I have a DLL that I copy over from another machine, register, run a couple of the ActiveXObjects (Using Javascript), unregister, and continue on my way. What this does is:
1) Once the DLL is registered, Run, and then unregistered, I can not delete it. This means that I have to restart Final Builder every single time as the file is locked until I do.
2) The files that the DLL acts upon also remain locked. Part of the process after unregistering it is to rename the files/directories that it acted upon. However, I can not do this because the files are locked as well until I restart FB.
Is there something funky I have to do in order to release this lock? I’ve already tried doing the object = null in the javascript that creates and runs this object, but hat doesn’t seem to help.
As a follow up, I’ve tried both “delete” and “= null” and tried VBScript as well. It appears that FinalBuilder is the owner creating the ActiveXObject instead of the action as a control. As such I have to close final builder in order to release this ActiveXObject. This does not work because I have to act upon the DLL that the ActiveXObject was created from.
Hi Trevor
Unfortunately this is a known issue (Raoul reported it a while back). The problem is that once the Active Scripting engine had loaded the dll into memory, it will hang onto the file until the process hosting the engine (finalbuilderin this case) is shutdown. I have tried unloading the scripting engine completely from finalbuilder once each script has finished running, unfortunately this doesn’t seem to help (my guess is the scripting engine doesn’t completely unload from the process).
Trevor,
A possible work-around for this is to create a .vbs file which does the stuff you need to do in there, and call it using cscript. Then when the cscript process completes, it shouldn’t hold on to the dll.
hth.
.t8
This was my workaround as well (well, a .js, but close enough). Seems to work fine doing this. But it does mean that I have to depend on even more external files. My “Misc” dir is growing.