Does anyone haveany ideas on how to check if a specific prerequisite has been installed and, if not, install it from the installer package itself?
I've got the following code but it's giving me the error message "Identifier expected":
I know the code is a little rough but I'm just trying to grasp the concept right now. I still have no idea how to optionally install the files that come with the package- I'm not even sure how to package them yet!Code:'This is an exmple of how I check each file before installing it Source: ..\code128.ttf; Check: InitializeSetup(); DestDir: {fonts}; FontInstall: Code 128 'Here's the function function InitializeSetup(): Boolean; var ErrorCode: Integer; NetFrameWorkInstalled : Boolean; SQLServerCEInstalled : Boolean; CrystalReportsInstalled : Boolean; Result1 : Boolean; OKAY : Boolean; begin if not OKAY then begin NetFrameWorkInstalled := RegValueExists(HKLM,'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\3.5', '3.5.21022.08'); SQLServerCEInstalled := RegKeyExists(HKLM,'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5'); CrystalReportsInstalled := RegKeyExists(HKLM,'HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\10.5\Crystal Reports'); if NetFrameWorkInstalled = true and SQLServerCEInstalled = true and CrystalReportsInstalled = true then begin OKAY := true; Result := true; end; else begin Result1 := MsgBox('One of the following prerequisites were not found: Microsoft .Net 3.5, SQL Server CE 3.0, Crystal Reports 10.5. Do you still wat to proceed?', mbConfirmation, MB_YESNO) = idYes; if Result1 then begin OKAY := true; Result := true; end; else begin OKAY := true; Result := false; end; end; end; end;
Overall, I think Inno Seup is great, but I still haven't got it all figued out yet.




Reply With Quote