Bonjour,
J'ai un petit problème d'encodage pour récupérer le flux d'une fenêtre ms-dos et l'afficher correctement dans un contrôle.
Mon code fonctionne mais m'affiche des caractères horribles :
Vous n'auriez pas une idée pour éviter ce problème d'affichage ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 Dim my_network_process As New Process my_network_process.StartInfo.FileName = "netsh.exe" Dim _command_string_builder As New StringBuilder _command_string_builder.Append("interface ip show address") With my_network_process.StartInfo .Arguments = _command_string_builder.ToString() .UseShellExecute = False .CreateNoWindow = True .RedirectStandardOutput = True End With my_network_process.Start() my_network_process.WaitForExit(30000) TextBox1.Text = my_network_process.StandardOutput.ReadToEnd()
Merci.
Partager