In Windows using Credentials Manager user 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. Don’t worry. MiTec’s System Information Management Suite’s helps to enumerate the Network Credentials, we will learn how to use the MiTeC_NetCreds 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.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.
- An Instance is created NC of TMiTeC_NetCreds. Loop through the NC Record count and add 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 Type can be Generic, Domain Password, Domain Certificate etc..
procedure TForm1.cmRefresh(Sender: TObject);
for i:=0 to NC.RecordCount-1 do
with List.Items.Add do begin
case NC.Records[i].Typ of
2: Caption:='Domain Password';
3: Caption:='Domain Certificate';
4: Caption:='Domain Visible Password';
5: Caption:='Generic Certificate';
6: Caption:='Domain Extended';
1007: Caption:='Maximum Extended';
Caption:=Format('Network Credentials - %d items',[List.Items.Count]);
- Display the Network Credentials properties as shown below.
It’s that simple to enumerate cached network credentials and list its properties for your application. Use this MiTeC component suite and get the job done quickly.