




已阅读5页,还剩1页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
这东西我倒是制作过,其实并不像想象中的那么复杂,但必须对grub有些初步的认识,然后自己制作logo就好了,别的安装程序,我用 inno制作了一个,发布给大家探讨。别的都一般,主要是在code段:可以自己设定密码及启动菜单的停留时间。CodevarAboutButton,CancelButton:TButton;URLLabel: TNewStaticText;BackgroundBitmapImage: TBitmapImage;BackgroundBitmapText: TNewStaticText;UserPage: TInputQueryWizardPage;IniFile, OldString, NewString:string;i,ResultCode: Integer;IniFileLines: TArrayOfString;function InitializeSetup(): boolean;begin Result := true Exec(ExpandConstant(sysattrib.exe), -r -s -h c:boot.ini, ExpandConstant(sys), SW_HIDE,ewnoWait, ResultCode) Result := MsgBox(安装须知: #13#13 如果您的系统为多系统,请在win2000,winXP,WIN2003下安装使用。, mbConfirmation, MB_YESNO) = idYes;if inikeyExists(operating systems,c:grldr,c:boot.ini) then beginResult := MsgBox(程序安装向导: #13#13 你已经安装过其他dos工具,选择将升级为XX备份恢复工具1.0#13#10选择保留现有dos工具箱并退出安装。 ,mbConfirmation, MB_YESNO) = idyes if Result = true then deltree (ExpandConstant(sdboot),true,true,true) if Result = False then MsgBox(程序安装向导: #13#13 您选择保留原有工具箱,现在将退出安装程序,再见。, mbInformation, MB_OK); end;end;procedure AboutButtonOnClick(Sender: TObject);beginMsgBox(本安装程序由“XXX”LQL制作 #13#13 更多绿软请光临XXX, mbInformation, mb_Ok);end;procedure URLLabelOnClick(Sender: TObject);varErrorCode: Integer;beginShellExec(open, http:/WWW.XXXX.COM, , , SW_SHOWNORMAL, ewNoWait, ErrorCode);end;procedure InitializeWizard();beginWizardForm.PAGENAMELABEL.Font.Color:= clRed;WizardForm.PAGEDESCRIPTIONLABEL.Font.Color:= clBlue;WizardForm.WELCOMELABEL1.Font.Color:= clpurple;WizardForm.WELCOMELABEL2.Font.Color:= clolive;WizardForm.PASSWORDLABEL.TabOrder := 0;CancelButton := WizardForm.CancelButton;AboutButton := TButton.Create(WizardForm);AboutButton.Left := WizardForm.ClientWidth - CancelButton.Left - CancelButton.Width;AboutButton.Top := CancelButton.Top;AboutButton.Width := CancelButton.Width;AboutButton.Height := CancelButton.Height;AboutButton.Caption := 关于(&A).;AboutButton.OnClick := AboutButtonOnClick;AboutButton.Parent := WizardForm;URLLabel := TNewStaticText.Create(WizardForm);URLLabel.Caption := XXXX 精简软件;URLLabel.Cursor := crHand;URLLabel.OnClick := URLLabelOnClick;URLLabel.Parent := WizardForm; Alter Font *after* setting Parent so the correct defaults are inherited first URLLabel.Font.Style := URLLabel.Font.Style + fsUnderline;URLLabel.Font.Color := clBlue;URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);BackgroundBitmapImage := TBitmapImage.Create(MainForm);BackgroundBitmapImage.Left := 50;BackgroundBitmapImage.Top := 100;BackgroundBitmapImage.AutoSize := True;BackgroundBitmapImage.Bitmap := WizardForm.WizardBitmapImage.Bitmap;BackgroundBitmapImage.Parent := MainForm;BackgroundBitmapText := TNewStaticText.Create(MainForm);BackgroundBitmapText.Left := BackgroundBitmapImage.Left;BackgroundBitmapText.Top := BackgroundBitmapImage.Top + BackgroundBitmapImage.Height + ScaleY(8);BackgroundBitmapText.Caption := TBitmapImage;BackgroundBitmapText.Parent := MainForm;UserPage := CreateInputQueryPage(wppassword,个性启动设置, 请输入您设置的WINDOWS 启动菜单停留时间和XXXX备份恢复工具启动密码,在这里设置WINDOWS 启动菜单停留时间和51LITE 备份恢复启动密码。请自己牢记!);UserPage.Add(XXXX 工具箱启动密码(默认为空):, False);UserPage.Add(windows 启动菜单停留时间(默认为8秒钟):, False);UserPage.Values0 := UserPage.Values1 := 8end;procedure CurStepChanged(CurStep: TSetupStep);beginif CurStep = ssdone thenbeginSetIniString(boot loader, timeout, UserPage.Values1, c:boot.ini);IniFile:=C:bootgrubmenu.lst;beginOldString:=password ;NewString:= password +UserPage.Values0;LoadStringsFromFile(IniFile, IniFileLines);for i:= 0 to GetArrayLength(IniFileLines)-1 doif (Pos(OldString, IniFileLines) 0) thenStringChange(IniFileLines, OldString, NewString);SaveStringsToFile(IniFile, IniFileLines, False); end;end;end;procedure DeinitializeSetup();beginExec(ExpandConstant(sysattrib.exe), +s +h c:boot.ini, ExpandConstant(sys), SW_HIDE,ewWaitUntilIdle, ResultCode) end;function InitializeUninstall():boolean; begin Result := true Exec(ExpandConstant(sysattrib.exe), -r -s -h c:boot.ini, ExpandConstant(sys), SW_HIDE,ewnoWait, ResultCode)end;procedure DeInitializeUninstall();begin Exec(ExpandConstant(sysattrib.exe), +s +h c:boot.ini, ExpandConstant(sys), SW_HIDE, ewWaitUntilIdle, ResultCode)end;SetupAppName=Boot V 1.5AppVerName=Boot 1.5DefaultDirName=tmpOutputBaseFilename=BootUninstallable=noDisableDirPage =yesDisableProgramGroupPage=trueDisableReadyPage =yesDisableFinishedPage =yesMessagesSetupWindowTitle=Boot修改ButtonCancel=退出ButtonNext=修改ExitSetupTitle=退出修改!ExitSetupMessage=修改未完成 %n%n 点击“是”退出修改,点击“否”继续修改!INIFilename: sdboot.ini; Section: boot loader; Key: timeout; String: code:GetYourTimeOutFilename: sdboot.ini; Section: operating systems; Key: sdgrldr; String: code:GetYourName; Flags: createkeyifdoesntexist uninsdeleteentryCodeprocedure CurPageChanged(CurPageID: Integer);begin if CurPageID = wpWelcome thenWizardForm.NextButton.OnClick(WizardForm)WizardForm.BorderIcons:= biSystemMenu, biMinimize; if CurPageID = wpInstalling thenWizardForm.Hide WizardForm.BackButton.Visible:= false;end;varPage: TInputQueryWizardPage;ValueYouEntered0: string;ValueYouEntered1: string;function GetYourTimeOut(Param: string): string;beginresult:= ValueYouEntered0;end;function GetYourName(Param: string): string;beginresult:= ValueYouEntered1;MsgBox(修改成功!, mbInformation, MB_OK);end;procedure InitializeWizard();var iCode: Integer;beginExec(attrib.exe, -r -h -s +ExpandConstant(sdboot.ini), , SW_HIDE, ewWaitUntilTerminated, iCode);Page := CreateInputQueryPage(wpLicense, 系统启动菜单设置, 设置你的启动菜单, 请设置你的启动菜单,然后单击“修改”。);Page.Add(操作系统列表等待时间(显示的为当前等待时间):, false);Page.Add(操作系统列表启动项名称(显示的为当前PE启动项名称):, false);if IniKeyExists(boot loader, timeout, ExpandConstant(sdboot.ini) thenPage.Values0:= GetIniString(boot loader, timeout, , ExpandConstant(sdboot.ini);if IniKeyExists(operating systems, ExpandConstant(sdgrldr), ExpandConstant(sdboot.ini) thenPa
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 休息与睡眠课件
- 防触电体验课件
- 大班线上儿歌课件
- 冷库技术测试题库及答案
- 建设银行2025山南市信息科技岗笔试题及答案
- 邮储银行2025结构化面试15问及话术云南地区
- fidic合同中英文对照版-secret2篇
- 农业银行2025岳阳市秋招笔试专业知识题专练及答案
- 建设银行2025湘潭市秋招笔试EPI能力测试题专练及答案
- 交通银行2025太原市秋招笔试价值观测评题专练及答案
- 技术方案评审表
- 人教版九年级数学下册第二十六章反比例函数-作业设计
- 人美小学美术五上《第1课:肖像艺术》课件
- 边坡削坡施工方案
- 湘美版五年级上册美术全册教案
- 浙江省通用安装工程预算定额第八册
- 乡村振兴战略实施与美丽乡村建设课件
- 视听语言PPT完整版全套教学课件
- 医学信息检索与利用智慧树知到答案章节测试2023年杭州医学院
- MT/T 548-1996单体液压支柱使用规范
- 实验室常规玻璃仪器的操作及注意事项课件
评论
0/150
提交评论