![MiTecsNEtCredsFSimage | Embarcadero RAD Studio Delphi C++Builder Blogs mitecsnetcredsfsimage](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2021/03/MiTecsNEtCredsFSimage-9855471.jpg?resize=1140%2C694&ssl=1)
Using Credentials Manager on windows allows users can easily identify the cached network credentials. However, Sometimes Developers need to list down the cached windows network credentials from a Delphi App programmatically? Don’t know how to do it?. Don’t worry. MiTec’s System Information Management Suite helps to enumerate the Network Credentials, we will learn how to use the MiTeC_NetCreds 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.3DemosDelphi24
- Open the NetCreds project in RAD studio 10.4.1 compile and Run the application.
- This Demo App shows how to list down the Network credentials, enumerate among them and access its properties.
Components used in MSIC TS Demo App:
- TListView to show the cached Network Credentials and its properties.
- TButton to save the listed Network Credentials to a .sif file and close the application.
Implementation Details:
- An Instance is created NC of TMiTeC_NetCreds. Loop through the NC Record count and add the Network Credentials item to the list view. List down the properties such as Credentials Type, Target, Timestamp, Username, and Password of each TCredRecord item to list view item. Credential Types can be Generic, Domain Password, Domain Certificate, etc.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
procedure TForm1.cmRefresh(Sender: TObject); var i: Integer; begin NC:=TMiTeC_NetCreds.Create(Self); NC.RefreshData; List.Items.Clear; for i:=0 to NC.RecordCount-1 do with List.Items.Add do begin case NC.Records[i].Typ of 1: Caption:='Generic'; 2: Caption:='Domain Password'; 3: Caption:='Domain Certificate'; 4: Caption:='Domain Visible Password'; 5: Caption:='Generic Certificate'; 6: Caption:='Domain Extended'; 7: Caption:='Maximum'; 1007: Caption:='Maximum Extended'; else Caption:=IntToStr(NC.Records[i].Typ); end; SubItems.Add(DateTimeToStr(NC.Records[i].Timestamp)); SubItems.Add(NC.Records[i].Target); SubItems.Add(NC.Records[i].Username); SubItems.Add(NC.Records[i].Password); end; Caption:=Format('Network Credentials - %d items',[List.Items.Count]); end; |
- Display the Network Credentials properties as shown below.
![NetCredsDemo3357012 | Embarcadero RAD Studio Delphi C++Builder Blogs netcredsdemo 3357012](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2021/03/NetCredsDemo-3357012.png?resize=750%2C407&ssl=1)
It’s that simple to enumerate cached network credentials and list their properties for your application. Use this MiTeC component suite and get the job done quickly.
With the use of Windows IDE, you can Quickly Identify The Windows Cached Network Credentials when developing in Delphi or C++ environments. Try your Free Trial here.
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition