; 脚本由 Inno Setup 脚本向导 生成! ; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档! #define MyAppName "我的程序" #define MyAppVersion "1.5" #define MyAppPublisher "我的公司" #define MyAppURL "http://www.example.com/" #define MyAppExeName "MyProg.exe" [Setup] ; 注: AppId的值为单独标识该应用程序。 ; 不要为其他安装程序使用相同的AppId值。 ; (若要生成新的 GUID,可在菜单中点击 "工具|生成 GUID"。) AppId={{0D5BFA20-02BB-46D0-A603-2638F085F72B} AppName={#MyAppName} AppVersion={#MyAppVersion} ;AppVerName={#MyAppName} {#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={autopf}\{#MyAppName} DisableProgramGroupPage=yes DisableReadyPage=yes DisableReadyMemo=yes ShowLanguageDialog=false LicenseFile=D:\Code\gitea\InnoSetup\MyProg\license.txt InfoBeforeFile=D:\Code\gitea\InnoSetup\MyProg\install_before.txt InfoAfterFile=D:\Code\gitea\InnoSetup\MyProg\install_after.txt ; 移除以下行,以在管理安装模式下运行(为所有用户安装)。 PrivilegesRequired=lowest PrivilegesRequiredOverridesAllowed=dialog OutputDir=D:\Code\gitea\InnoSetup\MyProg\Out OutputBaseFilename=mysetup Compression=lzma SolidCompression=yes WizardStyle=modern [Languages] Name: "chinesesimp"; MessagesFile: "compiler:Default.isl" Name: "english"; MessagesFile: "compiler:Languages\English.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] Source: "C:\Program Files (x86)\Inno Setup 6\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion ; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion” [Icons] Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent [Code] PROCEDURE CurPageChanged(CurPageID : INTEGER); BEGIN END; //指定跳过哪些标准页面 FUNCTION ShouldSkipPage(PageID : INTEGER) : BOOLEAN; BEGIN IF (PageID = wpLicense) THEN Result := TRUE; IF (PageID = wpPassword) THEN Result := TRUE; IF (PageID = wpInfoBefore) THEN Result := TRUE; IF (PageID = wpUserInfo) THEN Result := TRUE; IF (PageID = wpSelectDir) THEN Result := TRUE; IF (PageID = wpSelectComponents) THEN Result := TRUE; IF (PageID = wpSelectProgramGroup) THEN Result := TRUE; IF (PageID = wpSelectTasks) THEN Result := TRUE; IF (PageID = wpReady) THEN Result := TRUE; IF (PageID = wpPreparing) THEN Result := TRUE; IF (PageID = wpInfoAfter) THEN Result := TRUE; END; procedure InitializeWizard; begin end;