在使用PascalScript时,我遇到了一些问题.但在此之前,这是我用来创建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=yesDefaultGroupname={#MyAppname}disableProgramGroupPage=yeslicensefile=<license file Path>OutputDir=<Output Directory Path>OutputBasefilename=<Output file name>Compression=lzmaSolIDCompression=yesSetupIconfile=<Icon file Path>ArchitecturesInstallin64BitMode=x64Appcopyright={#MyAppcopyright}AppContact={#MyContact}VersionInfoVersion=1.5VersionInfoCompany=<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: uncheckedname: "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: Framework45IsnotinstalledSource: "<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: IsWin64Source: "<Path>\SSCERuntime_x86-ENU.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall 32bit; Permissions: admins-fullSource: "<Path>\SSCERuntime_x64-ENU.exe"; DestDir: "{tmp}"; Flags: 64bit deleteafterinstall; Permissions: admins-full; Check: IsWin64Source: "<Path>\<Product>.exe"; DestDir: "{app}"; Flags: ignoreversionSource: "<Path>\file1.dll"; DestDir: "{app}"; Flags: ignoreversion; NOTE: Don't use "Flags: ignoreversion" on any shared system files[Run]filename: {tmp}\NDP452-KB2901907-x86-x64-AllOS-ENU.exe; Parameters: "/q /norestart"; Check: Framework45Isnotinstalled; StatusMsg: Microsoft Framework 4.0 is being installed. This process might take some time. Please wait.....filename: "msIExec.exe"; Parameters: "/i ""{tmp}\CRRuntime_32bit_13_0_13.msi"; StatusMsg: Crystal Reports Runtime is being installed. Please wait....;filename: {tmp}\SSCERuntime_x86-ENU.exe; StatusMsg: Microsoft sql Compact 4.0 is 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) then 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: desktopiconname: "{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
现在我有三个问题:
>如何检查系统架构是32Bit还是64Bit并相应地执行相应的文件?
例如如脚本中所述,我为Crystal Reports附加了两个文件,现在在执行安装时,安装程序应检测系统体系结构并运行相应的文件.我试图用This Link here on StackOverdlow来解决这个问题但是并不太了解它.
>检查系统上是否已安装先决条件
例如要检查.NET Framework是否已安装在计算机上,我得到了上面提到的脚本并且工作正常.如何为Crystal Report或sql Compact执行此 *** 作?
我为Crystal Report尝试了这个脚本,但它没有用.
[Code]function CheckForCrystalReports: Boolean;var regresul: Cardinal;begin RegqueryDWordValue(HKLM,'SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Installer\CRV',regresul); if(regresul = 0) then begin Result := True; end else begin Result := False; end; end;
>以静默模式运行可执行文件
例如在上面的脚本中,我使用的参数:“/ q / norestart”;在静音模式下运行设置及其工作.但是如何为* .msi文件做到这一点?我尝试了一些参数,但它们没有用.
解决方法 使用ShellExec尝试此解决方案:[Run] filename: "{tmp}\CRRuntime_32bit_13_0_13.msi"; Parameters: "/passive"; Flags: shellexec waituntilterminated skipifdoesntexist; StatusMsg: "Crystal Reports Runtime is being installed. Please wait...";
如果您想通过MSIEXEC致电:
[Run] filename: "msIExec.exe"; Parameters: "/passive /i ""{tmp}\CRRuntime_32bit_13_0_13.msi"""; Flags: waituntilterminated skipifdoesntexist; StatusMsg: "Crystal Reports Runtime is being installed. Please wait...";
附:在Comment的代码段中,参数缺少引号.你应该打开和关闭参数“然后如果你需要在参数行中使用引号,你必须使用它Doubled.”“
对于sql Compact,您可以使用以下代码:
[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 is being installed. Please wait...; Check: (IsWin64) and (not IssqlCompact40Installed); filename: "{tmp}\SSCERuntime_x86-ENU.exe"; Parameters: "/qn /i"; Flags: waituntilterminated skipifdoesntexist; StatusMsg: sql Compact 4.0 x86 is being installed. Please wait...; Check: (not IsWin64) and (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) then begin if fileExists(InstallDirstring + '\sqlcecompact40.dll') then result := true; end;end;总结
以上是内存溢出为你收集整理的crystal-reports – 检查Inno Setup中的系统架构全部内容,希望文章能够帮你解决crystal-reports – 检查Inno Setup中的系统架构所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)