; 脚本由 Inno Setup 脚本向导 生成!
; 有关创建 Inno Setup 脚本文件的详细资料请查阅帮助文档!
[Setup]
; 注: AppId的值为单独标识该应用程序。
; 不要为其他安装程序使用相同的AppId值。
; (生成新的GUID,点击 工具|在IDE中生成GUID。)
AppId={{D77D24F4-27CA-4562-84AD-302F6A61337C}
AppName=我的程序
AppVersion=1.5
;AppVerName=我的程序 1.5
AppPublisher=我的公司
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\我的程序
DefaultGroupName=我的程序
;exe输出地址
OutputDir=C:\Users\Administrator\Desktop
;exe名
OutputBaseFilename=rgt
Compression=lzma
SolidCompression=yes
AlwaysRestart=yes
[Languages]
Name: "chinesesimp"; MessagesFile: "compiler:Default.isl"
;Source:文件源,DestDir:文件移动地址
[Files]
Source: "C:\Users\Administrator\Desktop\天津服务器维护文档.doc"; DestDir: "D:\"; Flags: ignoreversion
Source: "C:\Users\Administrator\Desktop\新建文件夹\319360.jpg"; DestDir: "C:\"; Flags: ignoreversion
; 注意: 不要在任何共享系统文件上使用“Flags: ignoreversion”
[Code]
//关键代码静默安装
procedure InitializeWizard();
begin
//不显示边框,这样就能达到不会闪两下了
WizardForm.BorderStyle:=bsNone;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
//因为安装过程界面隐藏不了,所以设置窗口宽高为0
WizardForm.ClientWidth := ScaleX(0)
WizardForm.ClientHeight := ScaleY(0)
if CurPageID = wpWelcome then
WizardForm.NextButton.OnClick(WizardForm);
if CurPageID >= wpInstalling then
WizardForm.Visible := False
else
WizardForm.Visible := True;
// WizardForm.NextButton.OnClick(WizardForm);
end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
result := true;
end;
innosetup制作静默安装包,安装后重启
最新推荐文章于 2024-06-16 21:53:36 发布