Our company has switched from using InstallShield Express to using Inno Setup (5.5.2 version). We\'ve got years of old installs utilizing InstallShield, but have always rel
Here's an untested translation, which should just print out the related product GUIDs in message boxes. The code should work with ANSI as well as with Unicode versions of InnoSetup:
[Code]
#ifdef UNICODE
#define AW "W"
#else
#define AW "A"
#endif
#define UPGRADE_CODE ""
const
ERROR_SUCCESS = $00000000;
ERROR_NOT_ENOUGH_MEMORY = $00000008;
ERROR_INVALID_PARAMETER = $00000057;
ERROR_NO_MORE_ITEMS = $00000103;
ERROR_BAD_CONFIGURATION = $0000064A;
function MsiEnumRelatedProducts(lpUpgradeCode: string; dwReserved: DWORD;
iProductIndex: DWORD; lpProductBuf: string): UINT;
external 'MsiEnumRelatedProducts{#AW}@msi.dll stdcall';
function InitializeSetup: Boolean;
var
I: Integer;
ProductBuf: string;
begin
Result := True;
I := 0;
SetLength(ProductBuf, 39);
while MsiEnumRelatedProducts('{#UPGRADE_CODE}', 0, I, ProductBuf) = ERROR_SUCCESS do
begin
MsgBox(ProductBuf, mbInformation, MB_OK);
I := I + 1;
SetLength(ProductBuf, 39);
end;
end;