2

We want to store customer specific credentials for our application in the Windows Credential Manager using Inno Setup.

We are building an installer that installs a part of our software in customer environments. We want the installer asking for those a client id and a client secret. And then we want to store this credentials in the Windows Credential Manager during the installation process. How can we achieve this?

I have seen those potentially interesting questions but I lack the understanding of how to use this in Inno Setup:

Windows service using those credentials will be running using the same account that runs the installer.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Markus
  • 2,071
  • 4
  • 22
  • 44

1 Answers1

1

I believe you can simply run cmdkey from Inno Setup, providing it credentials specified by the user (e.g. on a custom page):

[Run]
Filename: {sys}\cmdkey.exe; \
    Parameters: "/add:target /user:""{code:GetCred|0}"" /pass:""{code:GetCred|1}"""
[Code]
var
  Page: TInputDirWizardPage;

function GetCred(Param: string): string;
begin
  Result := Page.Values[StrToInt(Param)];
end;

You of course need to create the Page first using CreateInputQueryPage.

Similar questions:

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992