使用Inno Setup安装程序更新应用程序

时间:2015-02-02 20:49:16

标签: inno-setup

我正在学习如何使用Inno Setup为我的项目创建安装程序。在更新时我遇到了问题。我已经创建了安装程序,并成功安装了我的应用程序。然后,我在脚本中更新了我的版本号并重新编译,但是当我运行安装程序时,它似乎仍将其视为新安装。

例如,它会问我在哪里安装应用程序,当我点击下一步然后告诉我该目录已经存在。已经安装了应用程序。我希望跳过这一点。

以下是我的InnoSetup脚本

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

#define MyAppName "SQLite Manager"
#define MyAppVersion "1.0.0.2"
#define MyAppPublisher "Boardies IT Solutions"
#define MyAppURL "http://www.boardiesitsolutions.com"
#define MyAppExeName "SqliteManager.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={{98A016AD-2DE2-4FF9-B639-0FDCA0BE41FD}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\Boardies IT Solutions\{#MyAppName}
DefaultGroupName=Boardies IT Solutions
LicenseFile=C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\Terms.txt
OutputBaseFilename=sqliteman
SetupIconFile=C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\Logo.ico
Compression=lzma
SolidCompression=yes
UsePreviousAppDir=yes
CreateUninstallRegKey=no
UpdateUninstallLogAppName=no
DisableDirPage=auto

[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: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\SqliteManager.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\BoardiesITSolutions.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\BoardiesITSolutions.INIReader.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\changelog.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\EntityFramework.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\EntityFramework.SqlServer.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\Middleware.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\MySql.Data.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\System.Data.SQLite.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\System.Data.SQLite.EF6.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\System.Data.SQLite.Linq.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\WhatsNew.dll"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
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

1 个答案:

答案 0 :(得分:-4)

我注意到了一些细节 的AppId = {{98A016AD-2DE2-4FF9-B639-0FDCA0BE41FD}

看起来你的右大括号错过了。