I have created an app that contains docker containers. I need to install the docker image using the Inno setup installer and verify if the user system has docker installed in their system, if not give an error if it exists after successful installation and run the command in the installed directory.
I m using the installer package for the first time and from a python background, I tried creating a batch file to run the commands after installing the app but I need to verify the requirement as well.
Now even tho key is existing in the registry the function is returning false.
They key of the docker in registry: HKEY_LOCAL_MACHINE\SOFTWARE\DockerInc
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "https://www.example.com/"
[Code]
function InitializeSetup: Boolean;
begin
// allow the setup to continue initially
Result:= True;
if not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\DockerInc') then
begin
// return False to prevent installation to continue
Result:= False;
// and display a message box
MsgBox('Please install docker', mbError, MB_OK);
end;
end;
[Setup]
AppId={{C073696D-2706-40BE-81EE-B90C8C62E2EA}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputBaseFilename=mysetup
Compression=lzma
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "E:\PackageInstallerExample\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs