2017-03-10 9 views
-1

インストーラスクリプトに問題があります 私のアプリケーションをインストールしたいのですが、ホストに.net 4.5をインストールする必要があります。また、AccessRuntime2007が必要です。インストール後にInno setupスクリプトがaccessruntimeを実行しない

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 
+0

AccessRuntimeに.NETが必要な場合は(わかりませんが、あなたの質問にタイトルが示唆されています)、.NETフレームワークの後にインストールする必要があります。最初にインストールします。また、インストールが失敗する理由も教えてください。私たちはあなたのために推測しません。 '/ q'スイッチを削除するだけで何が間違っているのかが分かります。あなたが私たちに賢明な細部を与えるまで-1。 –

+0

OK、/ qを削除してコンパイルしています...実行してフィードバックを返します。アプリケーションに関しては...私のアプリケーションには、Accessランタイムライブラリ、.net 4.5ランタイムライブラリ、およびAcrobat Readerが必要です。 –

答えて

0

ありがとうございました!/qを削除する際に助言を受けました! Accessruntime.exeが/noreboot....iを/ norestartに変更したことを許可していないことがわかります。

関連する問題