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.FilePath = "\\192.168.0.253\backup\temp_Sebastian\DokuTest"
|
||||
Else
|
||||
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=192.168.0.94\SQLEXPRESS;Initial Catalog=Doku;User ID=sa;Password=BmWr501956;Connection Timeout=5;"
|
||||
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 Function
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
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 host As New cHost
|
||||
If smb = False Then
|
||||
@@ -42,8 +42,36 @@
|
||||
End If
|
||||
Else
|
||||
Path = "\\" & ip
|
||||
|
||||
If Not username = "" Then
|
||||
netuse(username, password, Path)
|
||||
End If
|
||||
|
||||
Process.Start(Path)
|
||||
End If
|
||||
End If
|
||||
'MsgBox(path)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user