Inno setup Inno设置脚本没有';安装.net后,请不要运行accessruntime

Inno setup Inno设置脚本没有';安装.net后,请不要运行accessruntime,inno-setup,Inno Setup,我对安装程序脚本有一些问题 我想安装我的应用程序,它需要在主机上安装.net 4.5。它还需要AccessRuntime2007 我遇到了一些问题,因为Accessruntime无法使用脚本进行安装。 也许序列有问题?谁能帮我 ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define My

我对安装程序脚本有一些问题 我想安装我的应用程序,它需要在主机上安装.net 4.5。它还需要AccessRuntime2007

我遇到了一些问题,因为Accessruntime无法使用脚本进行安装。 也许序列有问题?谁能帮我

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "JazzNotes"
#define MyAppVersion "1.0"
#define MyAppPublisher "EMDEE TECH"
#define MyAppURL "www.jazznotes.com"
#define MyAppExeName "JazzNotes.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{2F4E8FD6-6151-45A1-A421-8CA123E312CF}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
LicenseFile=C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\license.txt
OutputDir=C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\inno output
OutputBaseFilename=Install Jazznotes
SetupIconFile=C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\icons\Itzikgur-My-Seven-Music-Piano-Chello.ico
Compression=lzma
SolidCompression=yes

[Types]
Name: "full"; Description: "Full installation"
Name: "custom"; Description: "Custom installation"; Flags: iscustom


[Components]
Name: "program"; Description: "Program Files"; Types: full custom; Flags: fixed
Name: "help"; Description: "Help File";    Types: full
Name: "Net"; Description: ".NET 4.5 Framework";   Types: full
Name: "Acrobat" ; Description: "Acrobat Reader 8"; Types: full
Name: "Access" ; Description: "Access runtime files"; Types: full

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "dependencies\AccessRuntime.exe"; DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallFramework2; Components: Access
Source: "dependencies\AdbeRdr11010_en_US.exe"; DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallFramework3; Components: Acrobat
Source: "dependencies\dotnetfx45_full_x86_x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallFramework; Check: FrameworkIsNotInstalled ;Components: Net



Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\bin\x86\Release\JazzNotes.exe"; DestDir: "{app}"; Flags: ignoreversion   ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\bin\x86\Release\AxInterop.AcroPDFLib.dll"; DestDir: "{app}"; Flags: ignoreversion      ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\bin\x86\Release\AxInterop.WMPLib.dll"; DestDir: "{app}"; Flags: ignoreversion    ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\bin\x86\Release\Interop.AcroPDFLib.dll"; DestDir: "{app}"; Flags: ignoreversion  ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\bin\x86\Release\Interop.WMPLib.dll"; DestDir: "{app}"; Flags: ignoreversion  ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\bin\x86\Release\JazzNotes.exe.config"; DestDir: "{app}"; Flags: ignoreversion   ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\bin\x86\Release\NAudio.dll"; DestDir: "{app}"; Flags: ignoreversion  ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\bin\x86\Release\UltraID3Lib.dll"; DestDir: "{app}"; Flags: ignoreversion   ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.VisualBasic.Compatibility.dll"; DestDir: "{app}"; Flags: ignoreversion  ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll"; DestDir: "{app}"; Flags: ignoreversion   ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll"; DestDir: "{app}"; Flags: ignoreversion     ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll"; DestDir: "{app}"; Flags: ignoreversion    ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Deployment.dll"; DestDir: "{app}"; Flags: ignoreversion   ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Design.dll"; DestDir: "{app}"; Flags: ignoreversion    ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll"; DestDir: "{app}"; Flags: ignoreversion     ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Drawing.dll"; DestDir: "{app}"; Flags: ignoreversion    ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Net.Http.dll"; DestDir: "{app}"; Flags: ignoreversion    ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Web.dll"; DestDir: "{app}"; Flags: ignoreversion      ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Windows.Forms.dll"; DestDir: "{app}"; Flags: ignoreversion   ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.XML.dll"; DestDir: "{app}"; Flags: ignoreversion      ; Components: program
Source: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll"; DestDir: "{app}"; Flags: ignoreversion    ; Components: program
Source: "C:\Program Files (x86)\Microsoft.NET\Primary Interop Assemblies\stdole.dll"; DestDir: "{app}"; Flags: ignoreversion       ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\LTYPE.TTF"; DestDir: "{app}"; Flags: ignoreversion      ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\LTYPEB.TTF"; DestDir: "{app}"; Flags: ignoreversion      ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\LTYPEBO.TTF"; DestDir: "{app}"; Flags: ignoreversion   ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\MusiCAT\LTYPEO.TTF"; DestDir: "{app}"; Flags: ignoreversion   ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\jingle.wav"; DestDir: "{app}"; Flags: ignoreversion     ; Components: program
Source: "C:\Users\donnersm\Documents\Visual Studio 2015\Projects\MusiCAT\musica.accdb"; DestDir: "{app}"; Flags: ignoreversion    ; Components: program
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Code]
function FrameworkIsNotInstalled: Boolean;
begin
  Result := not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\.NETFramework\policy\v4.5');
end;

procedure InstallFramework;
var
  StatusText: string;
  ResultCode: Integer;
begin
  StatusText := WizardForm.StatusLabel.Caption;
  WizardForm.StatusLabel.Caption := 'Installing .NET framework...';
  WizardForm.ProgressGauge.Style := npbstMarquee;
  try
    if not Exec(ExpandConstant('{tmp}\dotnetfx45_full_x86_x64.exe'), '/q /noreboot', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
    begin
       // you can interact with the user that the installation failed
       MsgBox('.NET installation failed with code: ' + IntToStr(ResultCode) + '.',
         mbError, MB_OK);
    end;
  finally
    WizardForm.StatusLabel.Caption := StatusText;
    WizardForm.ProgressGauge.Style := npbstNormal;
  end;
end;

procedure InstallFramework2;
var
  StatusText: string;
  ResultCode: Integer;
begin
  StatusText := WizardForm.StatusLabel.Caption;
  WizardForm.StatusLabel.Caption := 'Installing Access Runtime files...';
  WizardForm.ProgressGauge.Style := npbstMarquee;
  try
    if not Exec(ExpandConstant('{tmp}\AccessRuntime.exe'), '/q /noreboot', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
    begin
       // you can interact with the user that the installation failed
       MsgBox('Access Runtime installation failed with code: ' + IntToStr(ResultCode) + '.',
         mbError, MB_OK);
    end;
  finally
    WizardForm.StatusLabel.Caption := StatusText;
    WizardForm.ProgressGauge.Style := npbstNormal;
  end;
end;


procedure InstallFramework3;
var
  StatusText: string;
  ResultCode: Integer;
begin
  StatusText := WizardForm.StatusLabel.Caption;
  WizardForm.StatusLabel.Caption := 'Installing Acrobar Reader';
  WizardForm.ProgressGauge.Style := npbstMarquee;
  try
    if not Exec(ExpandConstant('{tmp}\AdbeRdr11010_en_US.exe'), '/q /noreboot', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
    begin
       // you can interact with the user that the installation failed
       MsgBox('Acrobat installation failed with code: ' + IntToStr(ResultCode) + '.',
         mbError, MB_OK);
    end;
  finally
    WizardForm.StatusLabel.Caption := StatusText;
    WizardForm.ProgressGauge.Style := npbstNormal;
  end;
end;






[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

谢谢你,马丁!您关于删除/q的建议很有帮助!原来accessruntime.exe不允许/noreboot…我将其更改为/norestart。。。成功了

如果AccessRuntime需要.NET(我不知道,但您的问题标题表明需要),那么您必须在.NET framework之后安装它。你现在先安装它。另外,您应该告诉我们安装失败的原因。我们不会帮你猜的。只需卸下
/q
开关,您就会看到出了什么问题-1直到您提供一些合理的详细信息。好的,我删除了/q并正在编译…我将运行它并给出反馈。关于应用程序…我的应用程序需要Access运行时库、.net 4.5运行时库和acrobat reader。。。