Skip to content

Instantly share code, notes, and snippets.

@davidlares
Last active August 7, 2022 05:01
Show Gist options
  • Save davidlares/eed44229859a16ac8a1f07c5a84705bb to your computer and use it in GitHub Desktop.
Save davidlares/eed44229859a16ac8a1f07c5a84705bb to your computer and use it in GitHub Desktop.
Node's MSI binary install function for Inno Setup
[Code]
procedure RunNodeInstaller;
var
ErrorCode: Integer;
begin
if not ShellExec('', 'msiexec.exe', ExpandConstant('/i "{app}\{#NodeInstaller}" /qb'), '', SW_SHOWNORMAL, ewWaitUntilTerminated, ErrorCode) then
begin
MsgBox(IntToStr(ErrorCode), mbError, MB_OK);
end;
end;
#define NodeInstaller "node-v16.13.0-x64.msi"
[Run]
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\{#NodeInstaller}"" /qb"; WorkingDir: {tmp};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment