Do you need to collect system information which needs to be encrypted and compressed to a file for later use in your Delphi application. MiTec’s System Information Management Suite helps to easily encrypt/decrypt the system information. In this blog post, how to use the TMiTec_SystemInfo component’s TCodeStreamProcedure to Encrypt, Compress and save system information into a custom format file and load the same with the sample application.
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.3DemosDelphi2
- Open the SCPDemo project in RAD studio 10.4.1 compile and Run the application.
- This Demo App shows how to access the system information like Machine, Memory, CPU, Graphics, OS, etc.
Components used in MSIC StreamCodeProcedure Demo App:
- TMiTeC_SystemInfo: This component encapsulates most of MSICS components into one interface. Key properties are shown below. Using those properties, we can easily get the respective component properties. e.g consider CPU property has its own properties such as CPU architecture, Brand, CPU count, etc. Using this simple component you can access the entire system information quickly. Alternatively, we can access these components individually.
- TButton to open and save the system information to a file.
- TListView, to populate the collected system information in a list view.
Implementation Details:
- An instance is created SI of TMiTeC_SystemInfo. Using SI properties Machine, Memory, CPU, Graphics, OS, the respective values were added to the List view.
- Save the System information into a custom file format .cff by choosing the option Encrypt/Compress/Encrypt And Compress. The Stream is encrypted/Decrypted/Compressed/Decompressed using the following TCodeStreamProcedure type procedures. SaveToStorage is used to save the system information into the file.
- Later it can be loaded from the file using LoadFromStorage procedure and populated using the load button. TMiTeC_SystemInfo also has events to Read/Write header to the custom file.
Developers are not required to spend many hours identifying low-level system APIs to collect system information and save it securely to custom file format. Use this MiTeC component suite and get the job done quickly.
With the use of a Windows IDE, you can easily encrypt and compress your system information data in your Windows apps with a component suite. Try your Free Trial here.