This is an old problem that I've managed to work around using getfileversion(), but just out of curiosity does anybody know how to release an object once it's created? I expected a simple $system = 0 to do the trick, but the file lock remains. Is it expected behavior for object creation, or is it just kixforms?

In the below example, I can never replace kixforms.dll because the file remains locked.
 Code:
$System = CreateObject("Kixtart.Form")

if CompareVerString($System.Version, "2.47.5.1") = 1
   $System = 0
   $oldkf = ReadValue("HKEY_CLASSES_ROOT\CLSID\"+ReadValue("HKEY_CLASSES_ROOT\Kixtart.System\CLSID","")+"\InprocServer32","")
   Copy @ScriptDir+"\kixforms.dll" $oldkf
? @Error
? @SError
   $System = CreateObject("Kixtart.System")
endif

get $

Function CompareVerString($_Version1, $_Version2)
  Dim $_X, $_Max
  $_Version1 = Split($_Version1, '.')
  $_Version2 = Split($_Version2, '.')
  $_Max=IIf(UBound($_Version1)>UBound($_Version2),UBound($_Version1),UBound($_Version2))
  ReDim Preserve $_Version1[$_Max]
  ReDim Preserve $_Version2[$_Max]
  For $_X = 0 to $_Max
    Select
     Case CInt($_Version1[$_X]) < CInt($_Version2[$_X])
      $CompareVerString=1  Exit 0
     Case CInt($_Version1[$_X]) > CInt($_Version2[$_X])
      $CompareVerString=-1 Exit 0
    EndSelect
  Next
  Exit 0
EndFunction