누구나 Windows 7 호스트 파일에 항목을 추가하는 방법을 보여주는 inno 설치 샘플 스크립트를 도와 줄 수 있습니까?Windows 7에서 호스트 파일에 항목을 추가하는 이노 설치
고마워요.
누구나 Windows 7 호스트 파일에 항목을 추가하는 방법을 보여주는 inno 설치 샘플 스크립트를 도와 줄 수 있습니까?Windows 7에서 호스트 파일에 항목을 추가하는 이노 설치
고마워요.
이것은 Inno Setup이 제공하는 범위를 벗어난 작업처럼 보입니다. 이 같은 파일을 자신의 호스트를 포함 할 수 있도록 http://www.jrsoftware.org/iskb.php?custom
LMHOST은 #INCLUDE 문을 지원합니다 :
//call after inno setup step change
procedure UpdateLMhosts(CurStep: TSetupStep);
var
contents: TStringList;
filename, statement: String;
i: Integer;
begin
if(CurStep=ssDone) then begin
filename := ExpandConstant('{sys}\drivers\etc\lmhosts');
Log('Reading ' + filename);
contents := TStringList.Create();
if(FileExists(filename)) then begin
contents.LoadFromFile(filename);
end;
//copy my lmhosts to the system's lmhosts
statement := ExpandConstant('#INCLUDE {commonappdata}\MyBrand\MyApp\lmhosts');
if(contents.IndexOf(statement) < 0) then begin
Log('Adding' + statement);
contents.Append(statement);
contents.SaveToFile(filename);
end;
end;
end;
이것을 사용하는 사람에게'statement : ='를 호스트 파일에서 원하는 텍스트로 대체하십시오. –
파스칼 스크립트 내장이 매우 가능으로
는 제안에 대한 기술 자료를 다음 문서를 참조하십시오 할 것. –