日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

[Inno]制作类似矮人工具箱的程序/设置系统启动时间工具

發布時間:2024/1/1 windows 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [Inno]制作类似矮人工具箱的程序/设置系统启动时间工具 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

這里使用簡單代碼實現了,Inno對 系統工具箱的配置和安裝,是起步的好材料

?

[Code]
var

AboutButton,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('{sys}/attrib.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
? begin
Result := MsgBox('程序安裝向導:' #13#13 '你已經安裝過其他dos工具,選擇<是>將升級為"XX備份恢復工具1.0"'#13#10'選擇<否>保留現有dos工具箱并退出安裝。' ,mbConfirmation, MB_YESNO) = idyes
? if Result = true then
? deltree (ExpandConstant('{sd}/boot'),true,true,true)
? if Result = False then
? MsgBox('程序安裝向導:' #13#13 '您選擇保留原有工具箱,現在將退出安裝程序,再見。', mbInformation, MB_OK);
? end;
end;
procedure AboutButtonOnClick(Sender: TObject);
begin
MsgBox('本安裝程序由“XXX”LQL制作' #13#13 '更多綠軟請光臨"XXX"', mbInformation, mb_Ok);
end;


procedure URLLabelOnClick(Sender: TObject);
var
ErrorCode: Integer;
begin
ShellExec('open', 'http://WWW.XXXX.COM', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;

procedure InitializeWizard();
begin
WizardForm.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.Values[0] := ''
UserPage.Values[1] := '8'

end;

procedure CurStepChanged(CurStep: TSetupStep);
begin

if CurStep = ssdone then
begin
?? SetIniString('boot loader', 'timeout', UserPage.Values[1], 'c:/boot.ini');
?? IniFile:='C:/boot/grub/menu.lst';
?? begin
?? OldString:='password ';
?? NewString:= 'password '+UserPage.Values[0];
?? LoadStringsFromFile(IniFile, IniFileLines);
?? for i:= 0 to GetArrayLength(IniFileLines)-1 do
?? if (Pos(OldString, IniFileLines) > 0) then
?? StringChange(IniFileLines, OldString, NewString);
?? SaveStringsToFile(IniFile, IniFileLines, False);
? end;
end;
end;
procedure DeinitializeSetup();

begin
Exec(ExpandConstant('{sys}/attrib.exe'), ' +s +h c:/boot.ini', ExpandConstant('{sys}'), SW_HIDE,
ewWaitUntilIdle, ResultCode)
? end;
function InitializeUninstall():boolean;
? begin
? Result := true
? Exec(ExpandConstant('{sys}/attrib.exe'), '-r -s -h c:/boot.ini', ExpandConstant('{sys}'),? SW_HIDE,
ewnoWait, ResultCode)

end;

procedure DeInitializeUninstall();

begin
? Exec(ExpandConstant('{sys}/attrib.exe'), ' +s +h c:/boot.ini', ExpandConstant('{sys}'), SW_HIDE,
? ewWaitUntilIdle, ResultCode)
end;

?

?

順便附上一個相關小工具代碼:

?
[Setup]
AppName=Boot V 1.5
AppVerName=Boot 1.5
DefaultDirName={tmp}
OutputBaseFilename=Boot
Uninstallable=no
DisableDirPage =yes
DisableProgramGroupPage=true
DisableReadyPage =yes
DisableFinishedPage =yes

[Messages]
SetupWindowTitle=Boot修改
ButtonCancel=退出
ButtonNext=修改
ExitSetupTitle=退出修改!
ExitSetupMessage=修改未完成 %n%n 點擊“是”退出修改,點擊“否”繼續修改!

[INI]
Filename: {sd}/boot.ini; Section: boot loader; Key: timeout; String: {code:GetYourTimeOut}
Filename: {sd}/boot.ini; Section: operating systems; Key: {sd}/grldr; String: {code:GetYourName}; Flags: createkeyifdoesntexist uninsdeleteentry
[Code]
procedure CurPageChanged(CurPageID: Integer);
begin
? if CurPageID = wpWelcome then
??? WizardForm.NextButton.OnClick(WizardForm)
??? WizardForm.BorderIcons:= [biSystemMenu, biMinimize];
? if CurPageID = wpInstalling then
??? WizardForm.Hide
? WizardForm.BackButton.Visible:= false;
end;
var
Page: TInputQueryWizardPage;
ValueYouEntered0: string;
ValueYouEntered1: string;
function GetYourTimeOut(Param: string): string;
begin
result:= ValueYouEntered0;
end;
function GetYourName(Param: string): string;
begin
result:= ValueYouEntered1;
MsgBox('修改成功!', mbInformation, MB_OK);
end;
procedure InitializeWizard();
var iCode: Integer;
begin
Exec('attrib.exe', '-r -h -s '+ExpandConstant('{sd}/boot.ini'), '', SW_HIDE, ewWaitUntilTerminated, iCode);
Page := CreateInputQueryPage(wpLicense, '系統啟動菜單設置', '設置你的啟動菜單', '請設置你的啟動菜單,然后單擊“修改”。');
Page.Add('操作系統列表等待時間(顯示的為當前等待時間):', false);
Page.Add('操作系統列表啟動項名稱(顯示的為當前PE啟動項名稱):', false);
if IniKeyExists('boot loader', 'timeout', ExpandConstant('{sd}/boot.ini')) then
Page.Values[0]:= GetIniString('boot loader', 'timeout', '', ExpandConstant('{sd}/boot.ini'));
if IniKeyExists('operating systems', ExpandConstant('{sd}/grldr'), ExpandConstant('{sd}/boot.ini')) then
Page.Values[1]:= GetIniString('operating systems',ExpandConstant('{sd}/grldr'), '', ExpandConstant('{sd}/boot.ini'));
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
result:= true;
if CurPageID = Page.ID then
begin
? if (StrToIntDef(Page.Values[0],-1)<1) or (StrToIntDef(Page.Values[0],-1)>60) then
??? begin
???? MsgBox('請輸入一個 1 與 60 之間的整數!', mbInformation, MB_OK);
???? result:= false;
??? end
? if Length(Page.Values[1])<1 then
??? begin
???? MsgBox('請輸入啟動項名稱!', mbInformation, MB_OK);
???? result:= false;
??? end
else
ValueYouEntered0:= Page.Values[0];
ValueYouEntered1:= Page.Values[1];
end;
end;
procedure DeinitializeSetup();
var iCode: Integer;
begin
Exec('attrib.exe', '+r +h +s '+ExpandConstant('{sd}/boot.ini'), '', SW_HIDE, ewWaitUntilTerminated, iCode);
end;

input:focus,select:focus,textarea:focus{outline: #E2B635 3px solid;}

總結

以上是生活随笔為你收集整理的[Inno]制作类似矮人工具箱的程序/设置系统启动时间工具的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 蜜桃91精品入口 | 日韩成人在线免费视频 | 中文精品在线 | 欧美在线www | 久久dvd| 秋霞在线视频观看 | 成人免费毛片观看 | 亚洲黄色一区二区 | 成人第一页 | 欧美激情在线观看视频 | 中文字幕在线观看日本 | 豆国产97在线 | 亚洲 | 国产无遮挡又黄又爽在线观看 | 日本性爱动漫 | 污视频网站免费在线观看 | 人人看人人爱 | 无码人妻精品一区二区三区99日韩 | 欧美一级淫片007 | 精品国产一区二区三 | 日韩欧美国产三级 | 国产成人精品一区二 | 明里柚番号| 免费在线黄网站 | av网站在线播放 | 一级大黄毛片 | 91口爆一区二区三区在线 | 婷婷久久久 | 日韩在线视频网站 | 日韩女同互慰一区二区 | 中文字幕3页 | 天天摸天天干 | 亚洲好看站 | wwwxxx日本| 日韩中文在线字幕 | 欧美xxxx69| 顶级毛茸茸aaahd极品 | 五月天色网站 | 玖玖精品在线 | av男人天堂av| 亚洲一区二区三区免费在线观看 | 亚洲成在线 | 一级片视频免费 | 精品国产乱码久久久久久影片 | 一区二区福利视频 | 4438全国最大成人网 | 日韩欧美一区二区三区久久婷婷 | 日韩免费视频一区二区 | 探花系列在线观看 | 亚洲色图15p | 国产精品国产精品国产 | 九九视频在线观看 | 露脸丨91丨九色露脸 | 国产无码精品在线观看 | 亚洲女同一区二区 | 中文字幕在线看片 | 欧美做受喷浆在线观看 | 奇米在线777| 一区二区三区不卡视频 | 日韩欧美高清 | 五月婷在线观看 | 国产一区二区三区四区精 | 亚洲AV无码阿娇国产精品 | 中文字幕在线导航 | 狂野欧美性猛交xxxxhd | 天天干,天天爽 | 无码精品国产一区二区三区免费 | 日本国产精品 | 伊人tv| 午夜寂寞福利 | 成人免费av在线 | 日本丰满少妇做爰爽爽 | 中文字幕在线观看一区二区三区 | 亚洲涩涩爱 | 久久伊人精品 | 欧美电影一区二区三区 | a级片网址| 日本激情一区二区三区 | 日韩一区二区中文字幕 | 一本之道高清无码视频 | 国产二区一区 | 粉嫩小箩莉奶水四溅在线观看 | 9·1·黄·色·视·频 | 欧美精品免费一区二区三区 | 久久久久国产视频 | 超碰免费在线观看 | 琪琪色综合 | 日韩第六页 | 在线日本视频 | h片在线看 | 亚洲av无码一区二区三区观看 | 99国产精品99久久久久久粉嫩 | 亚洲综合干 | 国产精品视频导航 | 国产a线 | 黄色av网站在线免费观看 | 91极品身材尤物theporn | 久久99精品久久久久 | 操网站| 国内三级视频 |