This commit is contained in:
ms
2022-12-15 12:20:05 +01:00
parent f717deac50
commit e5536265a6
5 changed files with 49 additions and 22 deletions

View File

@@ -2,15 +2,23 @@
Public Class cExtProgramme
Public Shared Function startlink(URL As String)
Public Shared Function startlink(URL As String, Optional ByVal p As String = "")
Try
If URL.Contains("http") Or URL.Contains("https") Then
Process.Start(URL)
If p = "" Then
Process.Start(URL)
ElseIf p = "edge" Then
Dim edge As New Process
edge.StartInfo.FileName = "msedge.exe"
edge.StartInfo.Arguments = " " & URL
edge.Start()
End If
ElseIf URL = "" Then
Exit Function
Else
Dim mstsc As New Process
Exit Function
Else
Dim mstsc As New Process
mstsc.StartInfo.FileName = "mstsc.exe"
mstsc.StartInfo.Arguments = " /v: " & URL
mstsc.Start()
@@ -124,7 +132,7 @@ Public Class cExtProgramme
commandcmd("cmdkey /generic:" & host & " /user:" & Username & " /pass:" & Password)
End If
Threading.Thread.Sleep(1000)
Threading.Thread.Sleep(3000)
mstsc.StartInfo.FileName = "mstsc.exe"