Sometimes Developers Want to list or Identify USB Devices History in a machine programmatically. Don’t know how to do. Don’t worry. MiTec’s System Information Management Suite’s component helps to enumerate the USB Devices History we will learn how to use use the TMiTec_USBHistory component in this blog post.
You can easily install this Component Suite from GetIt Package Manager. The steps are as follows.
- Navigate In RAD Studio IDE->Tools->GetIt Package Manager->select Components in Categories->Components->Trail -MiTec system Information Component Suite 14.3 and click Install Button.
- Read the license and Click Agree All. An Information dialog saying ‘Requires a restart of RAD studio at the end of the process. Do you want to proceed? click yes and continue.
- It will download the plugin and installs it. Once installed Click Restart now.
How to run the Demo app:
- Navigate to the System Information Management Suite trails setup, Demos folder which is installed during Get It installation e.g) C:UsersDocumentsEmbarcaderoStudio21.0CatalogRepositoryMiTeC-14.3DemosDelphi25
- Open the USBHistory project in RAD studio 10.4.1 compile and Run the application.
- This Demo App shows how to list down the USB devices history in your machine, enumerate among them and access its key properties.
Components used in MSIC USBHistory Demo App:
- TMiTeC_USBHistory: Enumerates all USB devices History and their properties.
- TListView to show the connected USB Device History properties.
- TButton’s to save, and close the application.
- An instance is created USBHistory of TMiTeC_USBHistory. Call USBHistory.RefreshData, Add list of USB History to the TListView by loop through USBHistory.RecordCount. For each USBHistory Record get the properties such as Device Name, SerialNumber, Timestamp(lastseen), DeviceClass etc and add to list view subitems.
procedure TForm3.FormCreate(Sender: TObject);
for i:=0 to USBHistory.RecordCount-1 do
with lv.Items.Add do begin
- Display the selected USB Device History properties as shown below.
- It’s that simple to enumerate USB Devices History and list its properties for your application. Use this MiTeC component suite and get the job done quickly.