您好,登錄后才能下訂單哦!
#define MyAppName "我的程序" #define MyAppVersion "1.5" #define MyAppPublisher "我的公司" #define MyAppURL "http://www.example.com/" #define MyAppExeName "222.txt" ;222.txt為安裝后需要打開的文件名 [Setup] ; 注: AppId的值為單獨標識該應用程序。 ; 不要為其他安裝程序使用相同的AppId值。 ; (生成新的GUID,點擊 工具|在IDE中生成GUID。) AppId={{9B4D1741-599A-480C-B600-584E211BED16} AppName={#MyAppName} AppVersion={#MyAppVersion} ;AppVerName={#MyAppName} {#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={pf}\TETS DefaultGroupName={#MyAppName} ;安裝包保存的目錄 OutputDir=C:\Users\Administrator\Desktop ;安裝包的文件名 OutputBaseFilename=setup Compression=lzma SolidCompression=yes [Languages] Name: "chinesesimp"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1 ;添加文件請加在以下的文件處 [Files] Source: "E:\Test\222.txt"; DestDir: "{app}"; Flags: ignoreversion Source: "E:\Test\SQL.exe"; DestDir: "{app}"; Flags: ignoreversion ; 注意: 不要在任何共享系統文件上使用“Flags: ignoreversion” [Icons] Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon [code] [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; [Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。