2017-03-10 15 views
-1

설치 프로그램 스크립트에 약간의 문제가 있습니다. 내 응용 프로그램을 설치하려고하는데 .net 4.5를 호스트에 설치해야합니다. 또한 AccessRuntime2007이 필요합니다.Inno 설치 스크립트가 .net 설치 후 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 Framework 후에 설치해야합니다. 먼저 설치하십시오. 또한 설치가 실패한 이유를 알려주십시오. 우리는 당신을 추측하지 않을 것입니다. 그냥'/ q' 스위치를 제거하면 잘못된 것을 볼 수 있습니다. 당신이 우리에게 현명한 세부 사항을 줄 때까지 -1. –

+0

좋아, 내가/q를 제거하고 내가 컴파일 오전 ... 나는 그것을 실행하고 의견을 제공합니다. 애플 리케이션에 관해서 ... 내 응용 프로그램은 런타임 런타임 라이브러리, 닷넷 4.5 런타임 라이브러리 및 Acrobat Reader가 필요합니다 ... –

답변

0

고마워요!/q 제거에 대한 조언은 도움이되었습니다! Accessruntime.exe가 /noreboot....i가/norestart로 변경되었다는 것을 허용하지 않는다는 것을 알게되었습니다.