This commit is contained in:
ms
2018-11-23 11:35:25 +01:00
parent a23ee8809f
commit 94a5b5bf98
5 changed files with 59 additions and 10 deletions

View File

@@ -36,8 +36,8 @@ Public Class Main
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.KeyPreview = True
If sAppPath = "C:\Users\miesenbeck\Documents\Visual Studio 2017\Sebastian Spielwiese\Dokumentation\Dokumentation\bin\Debug" Or sAppPath = "C:\Users\miesenbeck\source\repos\Doku\Dokumentation\bin\Debug" Then
'MsgBox(sAppPath)
If sAppPath Like "*\bin\Debug" Then
Debug = True
LblDEBUGMODE.Visible = True
LblDEBUGMODE.ForeColor = Color.Red
@@ -49,11 +49,11 @@ Public Class Main
Class1.FilePath = "\\192.168.0.90\f\EDV-Wartung\Dokumentation"
End If
If Class1.DBConString = "Server=NBMIESENBECK\SPIELWIESE;Initial Catalog=Doku;User ID=sa;Password=verag#3;Connection Timeout=5;" Then
If Class1.DBConString = "Server=DEVELOPER\DEVSQL;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;" Then
TimerUpdate.Enabled = False
dbload()
LstStandortLoad()
LblVersion.Text = "TESTDATENBANK"
LblVersion.Text = "Version: " & Version
LblVersion.ForeColor = Color.Red
LblUhrzeit.ForeColor = Color.Red
@@ -762,18 +762,21 @@ Public Class Main
End Function
Public Function startputty()
Dim MainIP As String = Class1.MainHost(DgVMain.CurrentRow.Cells("IPAdresse").Value)
Dim Benutzer, Passwort As String
Class1.GetUserPasswort(MainIP, Benutzer, Passwort)
Try
Dim putty As New Process
putty.StartInfo.FileName = "putty.exe"
If DgVMain.CurrentRow.Cells("Benutzer").Value = "" And DgVMain.CurrentRow.Cells("Passwort").Value = "" Then
If Benutzer = "" And Passwort = "" Then
putty.StartInfo.Arguments = DgVMain.CurrentRow.Cells("IPAdresse").Value
Else
putty.StartInfo.Arguments = DgVMain.CurrentRow.Cells("IPAdresse").Value & " -l " & DgVMain.CurrentRow.Cells("Benutzer").Value & " -pw " & DgVMain.CurrentRow.Cells("Passwort").Value
putty.StartInfo.Arguments = DgVMain.CurrentRow.Cells("IPAdresse").Value & " -l " & Benutzer & " -pw " & Passwort
End If
putty.Start()
Catch ex As Exception
'MsgBox(ex.Message)
MsgBox(ex.Message)
End Try
End Function