crystal reports - Check System Architecture in Inno Setup -


i using inno setup create bootstrapper .net developed project.

while using pascalscript, facing problems. before that, here script using create bootstrapper

#define myappname "<productname>" #define myappversion "<productversion>" #define myapppublisher "<company name>" #define myappurl "<url>" #define myappexename "<appname>.exe" #define myappcopyright "copyright@2015" #define mycontact "<contact no>"  [setup] appid={{69a884d3-671f-4dfb-9e23-f6fa35bd6264} appname={#myappname} appversion={#myappversion} ;appvername={#myappname} {#myappversion} apppublisher={#myapppublisher} apppublisherurl={#myappurl} appsupporturl={#myappurl} appupdatesurl={#myappurl} defaultdirname={pf}\{#myappname} disabledirpage=yes defaultgroupname={#myappname} disableprogramgrouppage=yes licensefile=<license file path> outputdir=<output directory path> outputbasefilename=<output file name> compression=lzma solidcompression=yes setupiconfile=<icon file path> architecturesinstallin64bitmode=x64 appcopyright={#myappcopyright} appcontact={#mycontact} versioninfoversion=1.5 versioninfocompany=<company name> versioninfoproductname=<product name> versioninfoproductversion=<product version>  [languages] name: "english"; messagesfile: "compiler:default.isl"  [tasks] name: "desktopicon"; description: "{cm:createdesktopicon}"; groupdescription: "{cm:additionalicons}"; flags: unchecked name: "quicklaunchicon"; description: "{cm:createquicklaunchicon}"; groupdescription: "{cm:additionalicons}"; flags: unchecked; onlybelowversion: 0,6.1  [files] source: "<path>\ndp452-kb2901907-x86-x64-allos-enu.exe"; destdir: "{tmp}"; flags: deleteafterinstall; permissions: admins-full; check: framework45isnotinstalled source: "<path>\crruntime_32bit_13_0_13.msi"; destdir: "{tmp}"; flags: deleteafterinstall 32bit; permissions: admins-full; source: "<path>\crruntime_64bit_13_0_14.msi"; destdir: "{tmp}"; flags: 64bit deleteafterinstall; permissions: admins-full; check: iswin64 source: "<path>\ssceruntime_x86-enu.exe"; destdir: "{tmp}"; flags: deleteafterinstall 32bit; permissions: admins-full source: "<path>\ssceruntime_x64-enu.exe"; destdir: "{tmp}"; flags: 64bit deleteafterinstall; permissions: admins-full; check: iswin64  source: "<path>\<product>.exe"; destdir: "{app}"; flags: ignoreversion source: "<path>\file1.dll"; destdir: "{app}"; flags: ignoreversion ; note: don't use "flags: ignoreversion" on shared system files  [run] filename: {tmp}\ndp452-kb2901907-x86-x64-allos-enu.exe; parameters: "/q /norestart"; check: framework45isnotinstalled; statusmsg: microsoft framework 4.0 being installed. process might take time. please wait.....  filename: "msiexec.exe"; parameters: "/i ""{tmp}\crruntime_32bit_13_0_13.msi"; statusmsg: crystal reports runtime being installed. please wait....;  filename: {tmp}\ssceruntime_x86-enu.exe; statusmsg: microsoft sql compact 4.0 being installed. please wait.....  [code] function framework45isnotinstalled(): boolean; var   regresult: cardinal; begin   regquerydwordvalue(hklm, 'software\microsoft\net framework setup\ndp\v4\full', 'install', regresult);   if (regresult = 0)    begin     result := true;   end   else   begin   result := false;   end; end;  [icons] name: "{group}\{#myappname}"; filename: "{app}\{#myappexename}" name: "{group}\{cm:uninstallprogram,{#myappname}}"; filename: "{uninstallexe}" name: "{commondesktop}\{#myappname}"; filename: "{app}\{#myappexename}"; tasks: desktopicon name: "{userappdata}\microsoft\internet explorer\quick launch\{#myappname}"; filename: "{app}\{#myappexename}"; tasks: quicklaunchicon  [run] filename: "{app}\{#myappexename}"; description: "{cm:launchprogram,{#stringchange(myappname, '&', '&&')}}"; flags: nowait postinstall skipifsilent 

now have 3 problems regarding issue :

  1. how check if system architecture 32bit or 64bit , execute respective file accordingly ?

e.g. mentioned in script, have attached 2 files crystal reports, while executing setup, setup should detect system architecture , run respective file. tried solve using this link here on stackoverdlow didn't quite understand it.

  1. check if prerequisite installed on system or not

e.g. check if .net framework installed on machine, got script mentioned above , working fine. how crystal report or sql compact ?

i tried script crystal report it's not working.

[code] function checkforcrystalreports: boolean; var   regresul: cardinal; begin   regquerydwordvalue(hklm, 'software\sap businessobjects\suite xi 4.0\installer\crv','install',regresul);   if(regresul = 0)   begin   result := true;   end    else   begin   result := false;   end;  end; 
  1. run executable in silent mode

e.g. in above script, using parameters: "/q /norestart"; run setup in silent mode , working. how *.msi file ? tried parameters not working.

try solution shellexec:

[run]  filename: "{tmp}\crruntime_32bit_13_0_13.msi"; parameters: "/passive";  flags: shellexec waituntilterminated skipifdoesntexist;  statusmsg: "crystal reports runtime being installed. please wait...";  

if want call via msiexec:

[run]  filename: "msiexec.exe"; parameters: "/passive /i ""{tmp}\crruntime_32bit_13_0_13.msi""";   flags: waituntilterminated skipifdoesntexist;   statusmsg: "crystal reports runtime being installed. please wait..."; 

p.s. in code snippet comment there quotations missing parameters. should open , close parameters " if need use quotation in parameters line have use doubled. ""


for sql compact may use following code:

[files] source: "c:\temp\ssceruntime_x64-enu.exe"; destdir: "{tmp}";   flags: nocompression deleteafterinstall uninsremovereadonly   source: "c:\temp\ssceruntime_x86-enu.exe"; destdir: "{tmp}";   flags: nocompression deleteafterinstall uninsremovereadonly    [run]  filename: "{tmp}\ssceruntime_x64-enu.exe"; parameters: "/qn /i";    flags: waituntilterminated skipifdoesntexist;   statusmsg: sql compact 4.0 x64 being installed. please wait...;   check: (iswin64) , (not issqlcompact40installed);  filename: "{tmp}\ssceruntime_x86-enu.exe"; parameters: "/qn /i";    flags: waituntilterminated skipifdoesntexist;   statusmsg: sql compact 4.0 x86 being installed. please wait...;   check: (not iswin64) , (not issqlcompact40installed);   [code] function issqlcompact40installed(): boolean; var   installdirstring : string; begin   result := false;   if regquerystringvalue(hklm, 'software\microsoft\microsoft sql server compact edition\v4.0',    'installdir', installdirstring) begin     if fileexists(installdirstring + '\sqlcecompact40.dll')        result := true;   end; end; 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -