А от имени пользователя домена - вызывает ошибку
- Код: Выделить всё
Private password As SecureString
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
password = New SecureString()
For Each ch As Char In TextBox3.Text
password.AppendChar(ch)
Next
'Dim tt As String = Marshal.SecureStringToGlobalAllocUnicode(password).ToString
If (LoginValid(TextBox2.Text, TextBox4.Text)) Then
Dim myProcess As ProcessStartInfo = New ProcessStartInfo(TextBox1.Text)
myProcess.UserName = TextBox2.Text
myProcess.Password = password
myProcess.Domain = TextBox4.Text
myProcess.Arguments = TextBox5.Text
myProcess.UseShellExecute = False
'Process.Start(Textbox1.Text,TextBox2.Text,
Process.Start(myProcess)
Else
MsgBox("Falsh Login / Password")
End If