ms
This commit is contained in:
@@ -9,6 +9,7 @@ Public Class frmVersionCheck
|
||||
Private UPDATE_NECESSARY As Boolean = False
|
||||
Private UPDATE_CANCELLED As Boolean = False
|
||||
Private Shared myRow As String
|
||||
Private DBNOTINITIALIZED As Boolean = False
|
||||
Private Sub InitProgram()
|
||||
bw.WorkerReportsProgress = True
|
||||
AddHandler bw.DoWork, AddressOf bw_DoWork
|
||||
@@ -52,7 +53,7 @@ Public Class frmVersionCheck
|
||||
VERSION_USER = CInt(VERSION_USER.ToString.Replace(".", ""))
|
||||
VERSION_SERVER = CInt(VERSION_SERVER.ToString.Replace(".", ""))
|
||||
myRow = 54
|
||||
If (VERSION_USER = VERSION_SERVER) Or VERSION_SERVER = 1000 Or VERSION_USER = 1000 Then
|
||||
If (VERSION_USER >= VERSION_SERVER) Or VERSION_SERVER = 1000 Or VERSION_USER = 1000 Then
|
||||
Exit Sub
|
||||
End If
|
||||
UPDATE_NECESSARY = True
|
||||
@@ -64,6 +65,7 @@ Public Class frmVersionCheck
|
||||
FORCE_UPDATE = True
|
||||
End If
|
||||
End If
|
||||
ClassLogger.Add("Using VersionChecker-Version: " & Application.ProductVersion.ToString, False)
|
||||
If FORCE_UPDATE = False Then
|
||||
myRow = 68
|
||||
If ALL_USERS = False Then
|
||||
@@ -105,7 +107,9 @@ Public Class frmVersionCheck
|
||||
Exit For
|
||||
End If
|
||||
Dim updatefile2copy = Path.Combine(MyServer_UpdatePath, Upd_item.Item("ITEM_INFO"))
|
||||
|
||||
Dim tempfilename = Path.Combine(FOLDER_TEMP, Upd_item.Item("ITEM_INFO"))
|
||||
|
||||
If File.Exists(updatefile2copy) Then
|
||||
Try
|
||||
System.IO.File.Copy(updatefile2copy, tempfilename)
|
||||
@@ -141,10 +145,11 @@ Public Class frmVersionCheck
|
||||
End If
|
||||
|
||||
Else
|
||||
ClassLogger.Add(String.Format(">> Database was not intialized!"), False)
|
||||
ClassLogger.Add(String.Format("Database was not intialized!"), False)
|
||||
DBNOTINITIALIZED = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(String.Format(">> Unexpected Error in bwDoWork: " & ex.Message))
|
||||
ClassLogger.Add(String.Format("Unexpected Error in bwDoWork: " & ex.Message))
|
||||
ClassLogger.Add("myRow: " & myRow, False)
|
||||
End Try
|
||||
End Sub
|
||||
@@ -275,23 +280,40 @@ Public Class frmVersionCheck
|
||||
Sub Start_RO()
|
||||
Dim filename = ""
|
||||
Try
|
||||
Dim PMO_PATH = System.IO.Path.Combine(MY_INSTALL_PATH, "DD-Record-Organizer.exe")
|
||||
Dim PMO_PATH
|
||||
If DBNOTINITIALIZED = True And MY_INSTALL_PATH = String.Empty Then
|
||||
ClassLogger.Add("Trying to find RecordOrganizer Exe.....", False)
|
||||
PMO_PATH = System.IO.Path.Combine("D:\Program Files\Digital Data\Record Organizer", "DD-Record-Organizer.exe")
|
||||
If Not File.Exists(PMO_PATH) Then
|
||||
PMO_PATH = System.IO.Path.Combine("C:\Program Files (x86)\Digital Data\Record Organizer", "DD-Record-Organizer.exe")
|
||||
If Not File.Exists(PMO_PATH) Then
|
||||
|
||||
Else
|
||||
ClassLogger.Add("RecordOrganizer Exe located in : " & PMO_PATH, False)
|
||||
End If
|
||||
Else
|
||||
ClassLogger.Add("RecordOrganizer Exe located in : " & PMO_PATH, False)
|
||||
End If
|
||||
Else
|
||||
PMO_PATH = System.IO.Path.Combine(MY_INSTALL_PATH, "DD-Record-Organizer.exe")
|
||||
End If
|
||||
|
||||
myRow = "274"
|
||||
Dim startInfo As New ProcessStartInfo()
|
||||
startInfo.Arguments = """" & MyConnectionString & """"
|
||||
filename = startInfo.FileName
|
||||
|
||||
If System.IO.File.Exists(PMO_PATH) Then
|
||||
myRow = "280"
|
||||
myRow = "299"
|
||||
startInfo.FileName = PMO_PATH
|
||||
myRow = "282 - " & PMO_PATH
|
||||
myRow = "301 - " & PMO_PATH
|
||||
Process.Start(startInfo)
|
||||
Else
|
||||
MsgBox("Can not find ADDI-Executable in regular path! Please inform your systemadmin.", MsgBoxStyle.Critical)
|
||||
startInfo.FileName = "E:\SchreiberM\Visual Studio\GIT\RecordOrganizer\app\DD-Record-Organizer\bin\Debug\DD-Record-Organizer.exe"
|
||||
Process.Start(startInfo)
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Could not find RecordOrganizer: " & filename & " - " & ex.Message)
|
||||
ClassLogger.Add("myRow: " & myRow.ToString, False)
|
||||
|
||||
Reference in New Issue
Block a user