Use vWin32fh.pkg //Versioncheck. If there is a difference there has been an update of the maindatabase and //the program and maybe a laptop has to be updated. Procedure vscheck String strPrg strVs besked Integer filfundet filfundet2 ipos iSeqFile Get_Profile_String "WorkSpaces\CLIENT" "DataPath" To strVs Pos ";" in strVs To iPos If (iPos > 0) Left strVs To strVs (iPos - 1) Append strVs "\version.vs" Get vFilePathExists strVs To filfundet Get_Profile_String "WorkSpaces\SERVER" "ProgramPath" To strPrg Append strPrg "\clupdate.exe" Get vFilePathExists strPrg To filfundet2 Get Seq_New_Channel To iSeqFile Direct_Input Channel iSeqFile strVs Readln Channel iSeqFile strVs Close_Input Channel iSeqFile Send Seq_Release_Channel iSeqFile If ((Uppercase(Trim(strVs)) <> NV_CURRENT_VERSION) And (Filfundet <> 0)) Begin Move "Different versionnumbers found! Your program has to be updated. " To besked Append besked (Character(13)) (Character(10)) (Character(13)) (Character(10)) Append besked "The updateprogram will automatic start!" Send stop_box besked If (Filfundet2 <> 0) Begin Runprogram strPrg Abort End Else Begin Send stop_box "The updateprogram was not found!" Abort End End Get_Profile_String "WorkSpaces\SERVER" "DataPath" To strVs Pos ";" in strVs To iPos If (iPos > 0) Left strVs To strVs (iPos - 1) Append strVs "\version.vs" Get vFilePathExists strVs To filfundet Get Seq_New_Channel To iSeqFile Direct_Input Channel iSeqFile strVs Readln Channel iSeqFile strVs Close_Input Channel iSeqFile Send Seq_Release_Channel iSeqFile If ((Uppercase(Trim(strVs)) <> NV_CURRENT_VERSION) And (Filfundet <> 0)) Begin Move "Different versionnumbers found! Your program has to be updated. " To besked Append besked (Character(13)) (Character(10)) (Character(13)) (Character(10)) Append besked "The updateprogram will automatic start!" Send stop_box besked If (Filfundet2 <> 0) Begin Runprogram strPrg Abort End Else Begin Send stop_box "The updateprogram was not found!" Abort End End End_Procedure