PCI Vendor-ID auslesen ?
- VB.NET
Sie verwenden einen veralteten Browser (%browser%) mit Sicherheitsschwachstellen und können nicht alle Funktionen dieser Webseite nutzen.
Hier erfahren Sie, wie einfach Sie Ihren Browser aktualisieren können.
Hier erfahren Sie, wie einfach Sie Ihren Browser aktualisieren können.
Es gibt 9 Antworten in diesem Thema. Der letzte Beitrag () ist von TVX.
-
-
-
Hab da ein schönes Tutorial gefunden...halt ist ja meines
Spaß bei Seite schaus dir mal an:
[VB.NET] Systeminformationen mit WMI auslesen ab .NET 3.0 oder früherDieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Gather“ ()
-
Also - Gather - die Saite von dir hab ich mir direkt gesichert ,,die wird mir mit Sicherheit noch von nutzen sein +++
Ich habe es nun über - devcon - gemacht - hatte lange gesucht bis ich welche hatte die auf win 7 und 8 gehen !
Das bot sich mir halt an weil ich den Gerätemanager auch steuern möchte !
Allerdings schreibt meine listbox wieder alles in eine zeile
Rich TextBox & Textbox schreiben es genau richtig -- aber ich brauchs in na listbox
So wirds in der textbox angezeigt:
#############################################################################
PCI\VEN_1022&DEV_1202&SUBSYS_00000000&REV_00\3&267A616A&0&C2: PCI Standard-Host-CPU-Brücke
PCI\VEN_1166&DEV_024A&SUBSYS_571C7ABD&REV_01\4&5D18F2DF&1 : AEO4VU55 IDE Controller
PCI\VEN_1002&DEV_4396&SUBSYS_43961849&REV_00\3&267A616A&0&B2: Standard PCI-zu-USB erweiterter Hostcontroller
PCI\VEN_14E4&DEV_16B1&SUBSYS_96B11849&REV_10\4&3227B39C&0&0050: Broadcom NetLink (TM) Gigabit Ethernet
PCI\VEN_1002&DEV_5A16&SUBSYS_5A141849&REV_00\3&267A616A&0&10: PCI Standard-PCI-zu-PCI-Brücke
PCI\VEN_1022&DEV_1203&SUBSYS_00000000&REV_00\3&267A616A&0&C3: PCI Standard-Host-CPU-Brücke
PCI\VEN_1002&DEV_4397&SUBSYS_43971849&REV_00\3&267A616A&0&90: Standard OpenHCD USB-Hostcontroller
PCI\VEN_1002&DEV_5A19&SUBSYS_5A141849&REV_00\3&267A616A&0&28: PCI Standard-PCI-zu-PCI-Brücke
PCI\VEN_1B6F&DEV_7023&SUBSYS_70231849&REV_01\4&2E75CD95&0&0028: Etron USB 3.0 Extensible Host Controller
PCI\VEN_1022&DEV_1204&SUBSYS_00000000&REV_00\3&267A616A&0&C4: PCI Standard-Host-CPU-Brücke
PCI\VEN_1002&DEV_4383&SUBSYS_78921849&REV_40\3&267A616A&0&A2: High Definition Audio-Controller
PCI\VEN_1002&DEV_4397&SUBSYS_43971849&REV_00\3&267A616A&0&98: Standard OpenHCD USB-Hostcontroller
############################################################################
Und in der listbox alles am Band hintereinander (( wie mach ich den Zeilenumbruch dafür ))
CODE MIT LISTBOX AUSGABE:
VB.NET-Quellcode
- Public Class Form1
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- TopMost = True
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Process.Start("devcon", "disable PCI\VEN_14E4&DEV_16B1&CC_0200")
- My.Computer.Audio.Play(My.Resources.button_3, AudioPlayMode.Background)
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- Process.Start("devcon", "enable PCI\VEN_14E4&DEV_16B1&CC_0200")
- My.Computer.Audio.Play(My.Resources.button_3, AudioPlayMode.Background)
- End Sub
- Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
- On Error Resume Next
- IO.File.WriteAllBytes("C:\Windows\System32\devcon.exe", My.Resources.devcon32)
- My.Computer.Audio.Play(My.Resources.button_3, AudioPlayMode.Background)
- End Sub
- Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
- On Error Resume Next
- IO.File.WriteAllBytes("C:\Windows\System32\devcon.exe", My.Resources.devcon64)
- My.Computer.Audio.Play(My.Resources.button_3, AudioPlayMode.Background)
- End Sub
- 'Vendor-ID auslesen.
- Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
- Dim p As New Process
- p.StartInfo.UseShellExecute = False
- p.StartInfo.RedirectStandardOutput = True
- p.StartInfo.FileName = "devcon"
- p.StartInfo.Arguments = "find pci\*"
- p.Start()
- Dim text As String = p.StandardOutput.ReadToEnd
- p.WaitForExit()
- ListBox1.Items.Add(text)
- End Sub
- Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
- End Sub
- End Class
LG Andre -
Vielleicht mit einem
For Each
Block?
PS: Nein ich habe es nicht getestet. -
-
So musste noch Arbeiten --Endlich Wochenende
Habs jetz so gelöst - kurtz und sauber !
VB.NET-Quellcode
LG Andre... -
-
ist ja auch nur ne cmd einbindung und ja ich weiss (( On Error Resume Next )) das mach ich immer in der Probe ,,später gibts en catch !
Nur die Methode vbnewline hat bei z.b. Cods einen Fehler :
Als erstes Zeichen steht ein unsichtbares, ein LF = Line Feed
Also:
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von „TVX“ ()
-
VB.NET-Quellcode
- Public Class Form1
- Dim IDTEIL1 As Object
- Dim IDTEIL2 As Object
- 'FORM IMMER IM FORDERGRUND
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- Try
- TopMost = True
- TextBox3.Text = My.Settings.SAVE_LETZTER_AUFRUF3
- TextBox4.Text = My.Settings.SAVE_LETZTER_AUFRUF4
- My.Settings.Reload()
- 'STATUS ANZEIGE
- Dim p As New Process
- p.StartInfo.UseShellExecute = False
- p.StartInfo.RedirectStandardOutput = True
- p.StartInfo.FileName = "devcon"
- p.StartInfo.Arguments = "status " & TextBox3.Text.ToString
- p.Start()
- Dim text1 As String = p.StandardOutput.ReadToEnd
- p.WaitForExit()
- TextBox5.Text = text1.ToString
- TextBox5.Text = TextBox5.Text.Split(":")(1)
- Catch ex As Exception
- End Try
- End Sub
- '##############################################################################################################################################
- 'Selecktedt Auswahl mit rechter Maustaste aufheben
- Private Sub FileListBox1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListBox1.MouseDown
- If e.Button = Windows.Forms.MouseButtons.Right Then
- ListBox1.SelectedIndex = ListBox.NoMatches
- End If
- End Sub
- 'FORM CLOSE EVENT !
- Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
- My.Settings.SAVE_LETZTER_AUFRUF3 = TextBox3.Text
- My.Settings.SAVE_LETZTER_AUFRUF4 = TextBox4.Text
- My.Settings.Save()
- End Sub
- '###########################################################################################################################################
- 'DEVCON BEFEHL UMSETZEN
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- Try
- Process.Start("devcon", "disable " & TextBox3.Text.ToString)
- Catch ex As Exception
- End Try
- My.Computer.Audio.Play(My.Resources.button_3, AudioPlayMode.Background)
- End Sub
- 'DEVCON BEFEHL UMSETZEN
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- Try
- Process.Start("devcon", "enable " & TextBox3.Text.ToString)
- Catch ex As Exception
- End Try
- My.Computer.Audio.Play(My.Resources.button_3, AudioPlayMode.Background)
- End Sub
- 'DEVCON 32 BIT INSTALL
- Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
- Try
- IO.File.WriteAllBytes("C:\Windows\System32\devcon.exe", My.Resources.devcon32)
- Catch ex As Exception
- End Try
- My.Computer.Audio.Play(My.Resources.button_3, AudioPlayMode.Background)
- End Sub
- 'DEVCON 64 BIT INSTALL
- Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
- Try
- IO.File.WriteAllBytes("C:\Windows\System32\devcon.exe", My.Resources.devcon64)
- Catch ex As Exception
- End Try
- My.Computer.Audio.Play(My.Resources.button_3, AudioPlayMode.Background)
- End Sub
- 'Vendor-ID auslesen.
- Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
- ListBox1.Items.Clear()
- Try
- Dim p As New Process
- p.StartInfo.UseShellExecute = False
- p.StartInfo.RedirectStandardOutput = True
- p.StartInfo.FileName = "devcon"
- p.StartInfo.Arguments = "find pci\*"
- p.Start()
- Dim text As String = p.StandardOutput.ReadToEnd
- p.WaitForExit()
- ListBox1.Items.AddRange(text.Split(CChar(vbNewLine)))
- Catch ex As Exception
- End Try
- End Sub
- Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
- 'ID ANZEIGE
- Try
- TextBox3.Text = ""
- IDTEIL1 = ListBox1.SelectedItem.Split("&")(0)
- IDTEIL2 = ListBox1.SelectedItem.Split("&")(1)
- TextBox4.Text = ListBox1.SelectedItem.Split(":")(1)
- Dim sauber As String = (IDTEIL1 & "&" & IDTEIL2)
- sauber = Replace(sauber, vbLf, "")
- TextBox3.Text = sauber.ToString
- Catch ex As Exception
- End Try
- Try
- 'STATUS ANZEIGE
- Dim p As New Process
- p.StartInfo.UseShellExecute = False
- p.StartInfo.RedirectStandardOutput = True
- p.StartInfo.FileName = "devcon"
- p.StartInfo.Arguments = "status " & TextBox3.Text.ToString
- p.Start()
- Dim text1 As String = p.StandardOutput.ReadToEnd
- p.WaitForExit()
- TextBox5.Text = text1.ToString
- TextBox5.Text = TextBox5.Text.Split(":")(1)
- Catch ex As Exception
- End Try
- End Sub
- 'FIND ALLE GERÄTE
- Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
- ListBox1.Items.Clear()
- Try
- Dim p As New Process
- p.StartInfo.UseShellExecute = False
- p.StartInfo.RedirectStandardOutput = True
- p.StartInfo.FileName = "devcon"
- p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
- p.StartInfo.Arguments = "listclass usb 1394" 'resources
- p.Start()
- Dim text As String = p.StandardOutput.ReadToEnd
- p.WaitForExit()
- ListBox1.Items.AddRange(text.Split(CChar(vbNewLine)))
- Catch ex As Exception
- End Try
- End Sub
- 'GERÄTE NEU ERKENNEN ( RESCAN )
- Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
- Try
- Process.Start("devcon", " rescan")
- Catch ex As Exception
- End Try
- End Sub
- Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
- Me.WindowState = FormWindowState.Minimized
- End Sub
- End Class
Geschlossen
-
Ähnliche Themen
-
jack30t - - Sonstige Problemstellungen
-
TheGameSiders - - Off-Topic