Kundendatenblatt, SDLUpdater,
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
Public Class UPDATERfrm
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Public Class UPDATERfrm
|
||||
|
||||
Dim CopyIncremental = True
|
||||
Private Sub UPDATERfrm_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
End Sub
|
||||
@@ -17,15 +19,26 @@
|
||||
' Dim F As String = "\\192.168.0.90\f\Programme\SDL\" 'DEVELOPER
|
||||
' Dim F As String = "\\172.16.0.99\Daten\Programme\SDL\" ' ATILLA
|
||||
Public Sub Main()
|
||||
|
||||
Dim PARAM = ""
|
||||
Dim parameter() As String = Environment.GetCommandLineArgs().ToArray
|
||||
If (parameter.Count - 1) >= 1 Then 'Höher als 1 weil der index 0 der Pfad zum programm ist
|
||||
PARAM = parameter(1)
|
||||
End If
|
||||
|
||||
If PARAM = "full" Then
|
||||
CopyIncremental = False
|
||||
End If
|
||||
|
||||
'Falls Settings existiert, wird der Pfad daraus verwendet.
|
||||
F = System.IO.File.ReadAllText(AppDomain.CurrentDomain.BaseDirectory & "SDLUPDATER_Settings.txt")
|
||||
If Not System.IO.Directory.Exists(F) Then
|
||||
MsgBox("ERROR_UPDATE_05: Es konnte keine Verbindung mit dem F:\ Laufwerk hergestellt werden." & vbNewLine & "Wenn Sie eine Remote-Sitzung verwenden, melden Sie sich mit dieser erneut an.", MsgBoxStyle.Critical, "ERROR")
|
||||
Environment.Exit(0)
|
||||
End If
|
||||
writeLine(richtextbox, "3 Sekunden warten, um sicherzustellen, dass das Programm beendet wurde...")
|
||||
writeLine(RichTextBox, "3 Sekunden warten, um sicherzustellen, dass das Programm beendet wurde...")
|
||||
Threading.Thread.Sleep(3000) 'Falls Programm gerade am Beenden
|
||||
writeLine(richtextbox, "Starte Update...")
|
||||
writeLine(RichTextBox, "Starte Update...")
|
||||
' If Not My.Computer.FileSystem.DirectoryExists(F) Then
|
||||
'MsgBox("ERROR_UPDATE_02: Update-Daten existieren nicht.", MsgBoxStyle.Critical, "ERROR")
|
||||
' Else
|
||||
@@ -37,16 +50,22 @@
|
||||
MsgBox("ERROR_UPDATE_06: SDL.exe konnte nicht gelöscht werden. Das Programm wird evtl. noch ausgeführt.", MsgBoxStyle.Critical, "ERROR")
|
||||
Environment.Exit(0)
|
||||
End If
|
||||
delFiles()
|
||||
FileCopier()
|
||||
|
||||
If CopyIncremental Then 'CopyIncremental
|
||||
cProgrammeUpdate.copyProgramLIST(F, AppDomain.CurrentDomain.BaseDirectory, {"SDLUPDATER", "NOT_DEL_"})
|
||||
Else
|
||||
delFiles()
|
||||
FileCopier()
|
||||
End If
|
||||
|
||||
If Not System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "SDL.exe") Then
|
||||
MsgBox("ERROR_UPDATE_03: SDL.exe konnte nicht gestartet werden.", MsgBoxStyle.Critical, "ERROR")
|
||||
|
||||
End If
|
||||
If Not System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "upd.tmp") Then
|
||||
If Not System.IO.File.Exists(AppDomain.CurrentDomain.BaseDirectory & "upd.tmp") Then '
|
||||
System.IO.File.Create(AppDomain.CurrentDomain.BaseDirectory & "upd.tmp")
|
||||
End If
|
||||
writeLine(richtextbox, "Erfolgreich abgeschlossen...")
|
||||
writeLine(RichTextBox, "Erfolgreich abgeschlossen...")
|
||||
Process.Start("SDL.exe")
|
||||
Environment.Exit(0)
|
||||
End If
|
||||
@@ -196,13 +215,13 @@
|
||||
|
||||
' Quelldatei
|
||||
' Using nutzen
|
||||
fsmsource = New IO.FileStream(SourceFile.FullName, _
|
||||
IO.FileMode.Open, _
|
||||
fsmsource = New IO.FileStream(SourceFile.FullName,
|
||||
IO.FileMode.Open,
|
||||
IO.FileAccess.Read, IO.FileShare.Read)
|
||||
|
||||
' Zieldatei
|
||||
fsmtarget = New IO.FileStream(IO.Path.Combine(TargetDir, _
|
||||
SourceFile.Name), _
|
||||
fsmtarget = New IO.FileStream(IO.Path.Combine(TargetDir,
|
||||
SourceFile.Name),
|
||||
IO.FileMode.OpenOrCreate, IO.FileAccess.Write)
|
||||
|
||||
' Daten nach und nach einlesen und im Zielstream wieder
|
||||
|
||||
Reference in New Issue
Block a user