oh man, ich bin so nah dran, aber irgendwie will es nicht ...

ich habe jetzt ein programm geschrieben, das die standard ein und ausgabe
umleitet, in der hoffnung dadurch das passwort �bergeben zu k�nnen ... aber
irgendwie scheint windows die eingabe zu blockieren oder so. wisst ihr
vielleicht weiter?

hier mal der code:

Dim myProcess As Process = New Process()

Dim s As String

myProcess.StartInfo.FileName = "cmd.exe"

myProcess.StartInfo.UseShellExecute = False

myProcess.StartInfo.CreateNoWindow = True

myProcess.StartInfo.RedirectStandardInput = True

myProcess.StartInfo.RedirectStandardOutput = True

myProcess.StartInfo.RedirectStandardError = True

myProcess.Start()

Dim sIn As StreamWriter = myProcess.StandardInput

sIn.AutoFlush = True

Dim sOut As StreamReader = myProcess.StandardOutput

Dim sErr As StreamReader = myProcess.StandardError

sIn.Write("c:\Windows\system32\runAs.exe /user:localhost\admin
c:\client\schoolClient.exe" & _

System.Environment.NewLine)

s = sOut.ReadToEnd()

MessageBox.Show(s)

sIn.Write("PASSWORT" & System.Environment.NewLine)

s = sOut.ReadToEnd()

sIn.Close()

sOut.Close()

sErr.Close()

MessageBox.Show(s)



das erste s liefert das gew�nschte: bitte geben sie ein kennwort ein

das zweite s liefert einen leeren string. der prozess ist allerdings nicht
gestartet... :-(




_______________________________________________
Vb.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/vb.net

Odpovedet emailem