$sc=CreateObject("ScriptControl")
$sc.language = "VBScript"
$sc.addcode('noth=nothing')
$sc.run
$System = CreateObject("Kixtart.Form")
if CompareVerString($System.Version, "2.47.5.1") = 1
$System=$sc.codeobject.noth
$oldkf = ReadValue("HKEY_CLASSES_ROOT\CLSID\"+ReadValue("HKEY_CLASSES_ROOT\Kixtart.System\CLSID","")+"\InprocServer32","")
Copy @ScriptDir+"\kixforms.dll" $oldkf
? @Error
? @SError
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