선택 그룹이나 구성 요소를 보호 할 수있는 사람이 누구나 있습니다. PInno Setup : "X"구성 요소를 선택한 경우에만 암호 마법사 페이지를 만드는 방법
function CheckPassword(Password: String): Boolean;
begin
result := false;
if (Password='component') or (Password='type') then
result := true;
end;
선택 그룹이나 구성 요소를 보호 할 수있는 사람이 누구나 있습니다. PInno Setup : "X"구성 요소를 선택한 경우에만 암호 마법사 페이지를 만드는 방법
function CheckPassword(Password: String): Boolean;
begin
result := false;
if (Password='component') or (Password='type') then
result := true;
end;
나는 완전히 질문을 이해하지만 어쩌면이 도움이되지 확신 : 예
If ('Readme.txt').selected or ('compact').selected = True then
begin "Password wizard page";
else
result := true;
end;
이 작업 스크립트에 그런 뭔가를
. 다음은 Components의 섹션에 추가하기 만하면되는 몇 가지 기능입니다. 샘플이며 구성 요소 중 하나 ("도움말")는 사용자가 올바른 비밀번호를 입력 한 경우에만 설치할 수 있습니다.
설치 후반에 암호가 필요하며 항상 그런 것은 아니기 때문에 표준 설치 암호 페이지를 사용할 수 없습니다. 대신 자신의 페이지를 작성하고 구성 요소 선택 페이지 다음에 삽입됩니다
[Code]
var
PasswordPage: TInputQueryWizardPage;
procedure InitializeWizard();
begin
PasswordPage := CreateInputQueryPage(wpSelectComponents,
'Your caption goes here',
'Your description goes here',
'Your subcaption goes here');
PasswordPage.Add(SetupMessage(msgPasswordEditLabel), True);
end;
참고이 번역 된 암호 캡션을 사용하는, 당신은 다른 세 개의 문자열뿐만 아니라 번역해야 할 수 있습니다. 사용자가 설치 구성 요소를 선택하지 않은 경우
다음 해당 페이지를 숨길 필요합니다
function ShouldSkipPage(PageID: Integer): Boolean;
begin
Result := False;
if PageID = PasswordPage.ID then begin
// show password page only if help file is selected for installation
Result := not IsComponentSelected('help');
end;
end;
마지막으로 당신이 암호를 확인하고 경우 다음 페이지로 이동에서 사용자를 방지하기 위해 필요 비밀번호가 잘못되었습니다 :
function NextButtonClick(CurPageID: Integer): Boolean;
begin
Result := True;
if CurPageID = PasswordPage.ID then begin
// stay on this page if password is wrong
if PasswordPage.Edits[0].Text <> 'my-secret-password' then begin
MsgBox(SetupMessage(msgIncorrectPassword), mbError, MB_OK);
Result := False;
end;
end;
end;