Diverse Bug-Fixes; Umstellung auf FQDN statt IP Adressen;
This commit is contained in:
@@ -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