1

安装完成后,安装程序会为用户提供一个标记为“查看”的复选框选项,让用户可以选择在安装完成后打开安装文件夹。如何禁用此功能?

安装完成后,我不希望用户可以选择“查看”任何内容。只需关闭安装程序。

更新:这是脚本:

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

#define MyAppName "My App"
#define MyAppVersion "1.0"
#define MyAppPublisher "Blah, LLC"
#define MyAppURL "http://www.blah.com/"

[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={{f47ac10b-58cc-4372-a567-0e02b2c3d479}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
CreateAppDir=false
LicenseFile=Release\EULA.rtf
SetupIconFile=Release\bin\logo.ico
Compression=lzma/Max
SolidCompression=true
AppCopyright=Blah, LLC
AppVerName={#MyAppName}
DisableFinishedPage=yes
VersionInfoVersion=1.0
VersionInfoCompany=Blah, LLC
VersionInfoDescription=My description here.
VersionInfoCopyright=2012
VersionInfoProductName=My App
VersionInfoProductVersion=1.0

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

[Files]
Source: Release\bin\glassfish-3.1.2; DestDir: {sd}\MyApp; Flags: ignoreversion recursesubdirs createallsubdirs external; 
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: {src}\README.txt; DestDir: {tmp}; Attribs: ReadOnly; Flags: isreadme external dontcopy;

[Types]
Name: full; Description: "Full Installation";
Name: custom; Description: "Custom Installation"; Flags: IsCustom;

[Components]
Name: webserver; Description: "GlassFish 3.1.2 Application Server"; Types: full custom; ExtraDiskSpaceRequired: 100851712; 
Name: sqlserver; Description: "SQL Server Express 2008 R2"; ExtraDiskSpaceRequired: 745537536; Types: full custom;
Name: sqlserver\sqlserver_x64; Description: "Microsoft SQL Server Express (x64)"; Flags: exclusive; Types: full custom; 
Name: sqlserver\sqlserver_x86; Description: "Microsoft SQL Server Express (x86)"; Flags: exclusive; Types: full custom;

[Tasks]
Components: webserver; Name: glassfishservice; Description: "Register the web server as a Windows Service."; GroupDescription: "Web Server Options";

[Run]
Tasks: glassfishservice; Components: webserver; Filename: asadmin; Parameters: "create-service MyApp"; WorkingDir: "{sd}\MyApp\bin"; StatusMsg: "Creating GlassFish service."; 
Tasks: glassfishservice; Components: webserver; Filename: net; Parameters: "start ""MyApp GlassFish Server"""; StatusMsg: "Starting Windows service."; 
; https://blogs.oracle.com/foo/entry/automatic_starting_of_servers_in  AND   https://blogs.oracle.com/foo/entry/how_to_make_v3_platform
Filename: SQLEXPRWT_x86_ENU.exe; WorkingDir: {src}\bin; Description: "Installs SQL Server 32-bit edition."; StatusMsg: "Installing SQL Server Express 2008..."; Components: sqlserver\sqlserver_x86; Flags: HideWizard 32bit; 
Filename: SQLEXPRWT_x64_ENU.exe; WorkingDir: {src}\bin; Description: "Installs SQL Server 64-bit edition."; StatusMsg: "Installing SQL Server Express 2008..."; Components: sqlserver\sqlserver_x64; Flags: HideWizard 64bit; 
Components: "sqlserver sqlserver\sqlserver_x64 sqlserver\sqlserver_x86"; Filename: sqlcmd; Parameters: "-S COMPUTER\SQLEXPRESS -i {sd}\bin\script.sql"; Description: "Creating database."; 

[InnoIDE_PostCompile]
Name: "C:\Program Files\PowerISO\piso.exe"; Parameters: "create -o """"{#MyAppName} - v{#MyAppVersion}.iso"""" -add Release /"; Flags: CmdPrompt; 

[UninstallRun]
Tasks: glassfishservice; Components: webserver; Filename: net; Parameters: "stop ""MyApp GlassFish Server"""; StatusMsg: "Stopping Windows service."; 
Tasks: glassfishservice; Components: webserver; Filename: asadmin; Parameters: "_delete-service MyApp"; WorkingDir: "{sd}\MyApp\bin"; StatusMsg: "Destroying GlassFish service.";

[Dirs]
4

1 回答 1

3

如果这是 InnoSetup 安装,请检查您的[Run]部分以获取postinstall条目并将其删除。在文档postinstall中定义为:

安装后

Valid only in a [Run] section. Instructs Setup to create a checkbox on the Setup Completed wizard page. The user can uncheck or

选中此复选框,从而选择是否应处理此条目。以前这个标志被称为 showcheckbox。

完成页面上复选框的另一个原因是isreadme标志。从文档

是自述文件

文件是“README”文件。安装中只有一个文件可以具有此标志。当一个文件有这个标志时,用户会询问他/她是否想在安装完成后查看 README 文件。如果选择“是”,安装程序将使用该文件类型的默认程序打开该文件。因此,README 文件应始终以 .txt、.wri 或 .doc 之类的扩展名结尾。

请注意,如果安装程序必须重新启动用户的计算机(由于安装带有标志 restartreplace 的文件,或者如果 AlwaysRestart [Setup] 部分指令为 yes),则不会为用户提供查看 README 文件的选项

于 2012-05-01T22:52:25.217 回答