Diverse Bug-Fixes; Umstellung auf FQDN statt IP Adressen;
This commit is contained in:
@@ -51,8 +51,10 @@ Public Class Class1
|
|||||||
Class1.DBConString = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
Class1.DBConString = "Server=DEVELOPER.verag.ost.dmn\DEVSQL;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
||||||
Class1.FilePath = "\\192.168.0.253\backup\temp_Sebastian\DokuTest"
|
Class1.FilePath = "\\192.168.0.253\backup\temp_Sebastian\DokuTest"
|
||||||
Else
|
Else
|
||||||
Class1.DBConString = "Server=192.168.0.94\SQLEXPRESS;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
'Class1.DBConString = "Server=192.168.0.94\SQLEXPRESS;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
||||||
Class1.FilePath = "\\192.168.0.90\f\EDV-Wartung\Dokumentation"
|
Class1.DBConString = "Server=buchhaltung.verag.ost.dmn\SQLEXPRESS;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
||||||
|
'Class1.FilePath = "\\192.168.0.90\f\EDV-Wartung\Dokumentation"
|
||||||
|
Class1.FilePath = "\\DEVELOPER.verag.ost.dmn\f\EDV-Wartung\Dokumentation"
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function explorerstarten(ip As String, Optional ByVal smb As Boolean = False)
|
Public Shared Function explorerstarten(ip As String, Optional ByVal smb As Boolean = False, Optional ByVal username As String = "", Optional ByVal password As String = "")
|
||||||
Dim Path, nwstandort, netname As String
|
Dim Path, nwstandort, netname As String
|
||||||
Dim host As New cHost
|
Dim host As New cHost
|
||||||
If smb = False Then
|
If smb = False Then
|
||||||
@@ -42,8 +42,36 @@
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Path = "\\" & ip
|
Path = "\\" & ip
|
||||||
|
|
||||||
|
If Not username = "" Then
|
||||||
|
netuse(username, password, Path)
|
||||||
|
End If
|
||||||
|
|
||||||
Process.Start(Path)
|
Process.Start(Path)
|
||||||
End If
|
End If
|
||||||
'MsgBox(path)
|
'MsgBox(path)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function netuse(ByVal user As String, ByVal password As String, ByVal path As String)
|
||||||
|
Dim _netuse As New System.Diagnostics.ProcessStartInfo()
|
||||||
|
|
||||||
|
_netuse.CreateNoWindow = True
|
||||||
|
_netuse.WindowStyle = ProcessWindowStyle.Hidden
|
||||||
|
_netuse.FileName = "C:\Windows\system32\net"
|
||||||
|
_netuse.Arguments = " use " & path & " /User:" & user & " " & password
|
||||||
|
|
||||||
|
System.Diagnostics.Process.Start(_netuse)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function netdelete(ByVal path As String)
|
||||||
|
Dim _netuse As New System.Diagnostics.ProcessStartInfo()
|
||||||
|
|
||||||
|
_netuse.CreateNoWindow = True
|
||||||
|
_netuse.WindowStyle = ProcessWindowStyle.Hidden
|
||||||
|
_netuse.FileName = "C:\Windows\system32\net"
|
||||||
|
_netuse.Arguments = " use " & path & " /delete"
|
||||||
|
|
||||||
|
System.Diagnostics.Process.Start(_netuse)
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -616,30 +616,7 @@ Public Class Main
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub CmdTest_Click(sender As Object, e As EventArgs) Handles CmdTest.Click
|
Private Sub CmdTest_Click(sender As Object, e As EventArgs) Handles CmdTest.Click
|
||||||
|
cFolder.netdelete("10.4.3.17")
|
||||||
Dim i As Integer = 0
|
|
||||||
Dim Width As Integer = 0
|
|
||||||
Dim frm As New frmLeer
|
|
||||||
frm.Text = "Berechtigungen"
|
|
||||||
|
|
||||||
Dim tempUser As New cBenutzer
|
|
||||||
tempUser.FillWithLoggedOnUser()
|
|
||||||
|
|
||||||
For Each Standort As String In LstStandort.Items
|
|
||||||
Dim usrcntrl As New uscntr_Berechtigungen
|
|
||||||
usrcntrl.User = tempUser
|
|
||||||
usrcntrl.lblName.Text = Standort
|
|
||||||
usrcntrl.Name = Standort
|
|
||||||
usrcntrl.Standort = Standort
|
|
||||||
usrcntrl.Location = New Point(0, i * usrcntrl.Height)
|
|
||||||
i = i + 1
|
|
||||||
frm.PanMain.Controls.Add(usrcntrl)
|
|
||||||
Width = usrcntrl.Width
|
|
||||||
Next
|
|
||||||
|
|
||||||
frm.Width = Width
|
|
||||||
|
|
||||||
frm.Show()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1235,10 +1212,7 @@ Public Class Main
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnTest3_Click(sender As Object, e As EventArgs) Handles btnTest3.Click
|
Private Sub btnTest3_Click(sender As Object, e As EventArgs) Handles btnTest3.Click
|
||||||
Dim test As New cNetzwerk
|
cFolder.netuse("Verag", "1VerSub9#", "\\10.4.3.17")
|
||||||
test.getNetzwerk(LstStandort.SelectedItem, LstNetzwerk.SelectedItem)
|
|
||||||
test.getFirstHost()
|
|
||||||
MsgBox("STOP HIER")
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ToolStripMenuItemINFO_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItemINFO.Click
|
Private Sub ToolStripMenuItemINFO_Click(sender As Object, e As EventArgs) Handles ToolStripMenuItemINFO.Click
|
||||||
|
|||||||
2
Dokumentation/My Project/Resources.Designer.vb
generated
2
Dokumentation/My Project/Resources.Designer.vb
generated
@@ -169,7 +169,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die 0.0.1.34 ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die 0.0.1.35 ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property Version() As String
|
Friend ReadOnly Property Version() As String
|
||||||
Get
|
Get
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
<value>..\Resources\Link.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Link.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Version" xml:space="preserve">
|
<data name="Version" xml:space="preserve">
|
||||||
<value>0.0.1.34</value>
|
<value>0.0.1.35</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Link" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Link" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
|||||||
22
Dokumentation/frmHostBearbeiten.Designer.vb
generated
22
Dokumentation/frmHostBearbeiten.Designer.vb
generated
@@ -1,9 +1,9 @@
|
|||||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||||
Partial Class frmHostBearbeiten
|
Partial Class frmHostBearbeiten
|
||||||
Inherits System.Windows.Forms.Form
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
<System.Diagnostics.DebuggerNonUserCode()>
|
||||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
Try
|
Try
|
||||||
If disposing AndAlso components IsNot Nothing Then
|
If disposing AndAlso components IsNot Nothing Then
|
||||||
@@ -20,7 +20,7 @@ Partial Class frmHostBearbeiten
|
|||||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()>
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.components = New System.ComponentModel.Container()
|
Me.components = New System.ComponentModel.Container()
|
||||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmHostBearbeiten))
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmHostBearbeiten))
|
||||||
@@ -70,6 +70,7 @@ Partial Class frmHostBearbeiten
|
|||||||
Me.CmdDelete = New System.Windows.Forms.Button()
|
Me.CmdDelete = New System.Windows.Forms.Button()
|
||||||
Me.TxtBenutzername = New System.Windows.Forms.TextBox()
|
Me.TxtBenutzername = New System.Windows.Forms.TextBox()
|
||||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||||
|
Me.cmdAuthSMB = New System.Windows.Forms.Button()
|
||||||
Me.cmdSMB = New System.Windows.Forms.Button()
|
Me.cmdSMB = New System.Windows.Forms.Button()
|
||||||
Me.ChkShowSlaves = New System.Windows.Forms.CheckBox()
|
Me.ChkShowSlaves = New System.Windows.Forms.CheckBox()
|
||||||
Me.lblSuchfilter = New System.Windows.Forms.Label()
|
Me.lblSuchfilter = New System.Windows.Forms.Label()
|
||||||
@@ -297,6 +298,7 @@ Partial Class frmHostBearbeiten
|
|||||||
Me.TxtInfo.Location = New System.Drawing.Point(332, 129)
|
Me.TxtInfo.Location = New System.Drawing.Point(332, 129)
|
||||||
Me.TxtInfo.Multiline = True
|
Me.TxtInfo.Multiline = True
|
||||||
Me.TxtInfo.Name = "TxtInfo"
|
Me.TxtInfo.Name = "TxtInfo"
|
||||||
|
Me.TxtInfo.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||||
Me.TxtInfo.Size = New System.Drawing.Size(300, 87)
|
Me.TxtInfo.Size = New System.Drawing.Size(300, 87)
|
||||||
Me.TxtInfo.TabIndex = 103
|
Me.TxtInfo.TabIndex = 103
|
||||||
'
|
'
|
||||||
@@ -503,6 +505,7 @@ Partial Class frmHostBearbeiten
|
|||||||
'
|
'
|
||||||
'Panel1
|
'Panel1
|
||||||
'
|
'
|
||||||
|
Me.Panel1.Controls.Add(Me.cmdAuthSMB)
|
||||||
Me.Panel1.Controls.Add(Me.cmdSMB)
|
Me.Panel1.Controls.Add(Me.cmdSMB)
|
||||||
Me.Panel1.Controls.Add(Me.ChkShowSlaves)
|
Me.Panel1.Controls.Add(Me.ChkShowSlaves)
|
||||||
Me.Panel1.Controls.Add(Me.TxtBenutzername)
|
Me.Panel1.Controls.Add(Me.TxtBenutzername)
|
||||||
@@ -548,6 +551,18 @@ Partial Class frmHostBearbeiten
|
|||||||
Me.Panel1.Size = New System.Drawing.Size(643, 415)
|
Me.Panel1.Size = New System.Drawing.Size(643, 415)
|
||||||
Me.Panel1.TabIndex = 137
|
Me.Panel1.TabIndex = 137
|
||||||
'
|
'
|
||||||
|
'cmdAuthSMB
|
||||||
|
'
|
||||||
|
Me.cmdAuthSMB.BackColor = System.Drawing.SystemColors.ControlLightLight
|
||||||
|
Me.cmdAuthSMB.FlatAppearance.BorderColor = System.Drawing.Color.DimGray
|
||||||
|
Me.cmdAuthSMB.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||||
|
Me.cmdAuthSMB.Location = New System.Drawing.Point(434, 378)
|
||||||
|
Me.cmdAuthSMB.Name = "cmdAuthSMB"
|
||||||
|
Me.cmdAuthSMB.Size = New System.Drawing.Size(96, 23)
|
||||||
|
Me.cmdAuthSMB.TabIndex = 139
|
||||||
|
Me.cmdAuthSMB.Text = "Auth. SMB"
|
||||||
|
Me.cmdAuthSMB.UseVisualStyleBackColor = False
|
||||||
|
'
|
||||||
'cmdSMB
|
'cmdSMB
|
||||||
'
|
'
|
||||||
Me.cmdSMB.BackColor = System.Drawing.SystemColors.ControlLightLight
|
Me.cmdSMB.BackColor = System.Drawing.SystemColors.ControlLightLight
|
||||||
@@ -692,4 +707,5 @@ Partial Class frmHostBearbeiten
|
|||||||
Friend WithEvents lblSuchfilter As Label
|
Friend WithEvents lblSuchfilter As Label
|
||||||
Friend WithEvents PanNavTop As Panel
|
Friend WithEvents PanNavTop As Panel
|
||||||
Friend WithEvents cmdSMB As Button
|
Friend WithEvents cmdSMB As Button
|
||||||
|
Friend WithEvents cmdAuthSMB As Button
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -306,11 +306,17 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles Me.KeyDown
|
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles Me.KeyDown
|
||||||
|
If e.KeyCode = Keys.ControlKey Then cmdAuthSMB.Text = "NetDelete"
|
||||||
|
|
||||||
If e.KeyCode = Keys.Escape Then
|
If e.KeyCode = Keys.Escape Then
|
||||||
Me.Close()
|
Me.Close()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As KeyEventArgs) Handles Me.KeyUp
|
||||||
|
cmdAuthSMB.Text = "Auth. SMB"
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub MitHTTPFüllenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles MitHTTPFüllenToolStripMenuItem.Click
|
Private Sub MitHTTPFüllenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles MitHTTPFüllenToolStripMenuItem.Click
|
||||||
TxtLink.Text = "http://" & TxtIP.Text & "/"
|
TxtLink.Text = "http://" & TxtIP.Text & "/"
|
||||||
End Sub
|
End Sub
|
||||||
@@ -329,5 +335,20 @@
|
|||||||
Clipboard.SetText(host.IPAdresse)
|
Clipboard.SetText(host.IPAdresse)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CmdAuthSMB_Click(sender As Object, e As EventArgs) Handles cmdAuthSMB.Click
|
||||||
|
If cmdAuthSMB.Text = "Auth. SMB" Then
|
||||||
|
' cFolder.netdelete("\\" & host.IPAdresse)
|
||||||
|
cFolder.netuse(host.Benutzer, host.Passwort, "\\" & host.IPAdresse)
|
||||||
|
cFolder.explorerstarten(host.IPAdresse, True)
|
||||||
|
Else
|
||||||
|
cFolder.netdelete("\\" & host.IPAdresse)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CmdSMBReset_Click(sender As Object, e As EventArgs)
|
||||||
|
cFolder.netdelete("\\" & host.IPAdresse)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user