diff --git a/Main.vb b/Main.vb
index 1c75a24..0b14ff3 100644
--- a/Main.vb
+++ b/Main.vb
@@ -1,6 +1,7 @@
Imports System.Environment
Imports System.Globalization
Imports System.IO
+Imports System.Net.NetworkInformation
Imports Microsoft.Win32
Public Class TSUserReporter
@@ -22,6 +23,15 @@ Public Class TSUserReporter
Me.Visible = False
StartTime = Date.Now
+ If IstServerErreichbar("sqlcluster.verag.ost.dmn") Then
+ 'MsgBox("Erreichbar")
+ Else
+ ' MsgBox("Nicht erreichbar")
+ UpdateTimer.Enabled = False
+ Exit Sub
+
+ End If
+
Routine()
SetPrinterRoutine()
@@ -345,6 +355,17 @@ Public Class TSUserReporter
End Sub
+ Function IstServerErreichbar(server As String) As Boolean
+ Try
+ Dim ping As New Ping()
+ Dim reply = ping.Send(server, 1000) ' Timeout 1 Sekunde
+
+ Return reply.Status = IPStatus.Success
+ Catch
+ Return False
+ End Try
+ End Function
+
End Class
Public Class Drucker
diff --git a/TSUserReporter.vbproj b/TSUserReporter.vbproj
index d092d8f..a818af8 100644
--- a/TSUserReporter.vbproj
+++ b/TSUserReporter.vbproj
@@ -70,7 +70,7 @@
true
- 0E7F805EC73FC627C5B07472C1EF817DF8E04CE2
+ 1A931924D8078AE56D64EFA22EB781250AB2DEF4
true