This commit is contained in:
SchreiberM
2017-02-01 12:47:07 +01:00
parent 5023a28d75
commit 6c1d38e67f
3 changed files with 60 additions and 2 deletions

View File

@@ -77,6 +77,8 @@ Public Class frmVersionCheck
End If
Console.WriteLine(fri.Name)
Next fri
Replace_Files()
Try
'Delete the tempfolder and all data
System.IO.Directory.Delete(FOLDER_TEMP, True)
@@ -94,6 +96,7 @@ Public Class frmVersionCheck
' InitInterface wurde in frmMain integriert
'Init.InitInterface(mainForm)
System.Threading.Thread.Sleep(200)
Start_RO()
Else
End If
@@ -101,10 +104,24 @@ Public Class frmVersionCheck
' MsgBox("Unexpected Error in Init Classes: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
'End Try
End Sub
Sub Replace_Files()
Try
Dim ProductionPath As String = System.IO.Path.Combine(MY_ADDON_PATH, "Record Organizer")
Dim DevelPath As String = System.IO.Path.Combine(MY_ADDON_PATH, "DD-Record-Organiser\bin\Debug")
Dim COPY_FROM_PATH As String
If Directory.Exists(ProductionPath) Then
COPY_FROM_PATH = ProductionPath
Else
COPY_FROM_PATH = DevelPath
End If
Catch ex As Exception
MsgBox("Unexpected Error in Replace_Files: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Sub Start_RO()
Try
Dim ProductionPath As String = System.IO.Path.Combine(MY_ADDON_PATH, "RightManager", "RecordOrganizer_RightManager.exe")
Dim DevelPath As String = System.IO.Path.Combine(MY_ADDON_PATH, "RecordOrganizer_RightManager\bin\Debug", "RecordOrganizer_RightManager.exe")
Dim ProductionPath As String = System.IO.Path.Combine(MY_ADDON_PATH, "Record Organizer", "DD-Record-Organiser.exe")
Dim DevelPath As String = System.IO.Path.Combine(MY_ADDON_PATH, "DD-Record-Organiser\bin\Debug", "DD-Record-Organiser.exe")
Dim startInfo As New ProcessStartInfo()
startInfo.Arguments = """" & MyConnectionString & """"