Sometimes Developers Want to list or Identify USB Devices History in a machine programmatically. Don’t know what 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.
Platforms: Windows.
Installation Steps:
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.
Implementation Details:
- 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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
procedure TForm3.FormCreate(Sender: TObject); var i: Integer; begin USBHistory:=TMiTeC_USBHistory.Create(Self); USBHistory.RefreshData; for i:=0 to USBHistory.RecordCount-1 do with lv.Items.Add do begin Caption:=USBHistory.Records[i].Name; Subitems.Add(USBHistory.Records[i].SerialNumber); SubItems.Add(DateTimeToStr(USBHistory.Records[i].Timestamp)); Subitems.Add(USBHistory.Records[i].DeviceClass); end; lv.AlphaSort; end; |
- 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.
You can Quickly Get USB Devices History On Windows Using Delphi’s IDE Software. Begin developing in C++ or Delphi environments right away.
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition