谢谢
解决方法 lmhost支持#include语句,因此您可以包含自己的hosts文件,如下所示://call after inno setup step changeprocedure 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;总结
以上是内存溢出为你收集整理的inno-setup – Inno设置在Windows 7下的hosts文件中添加一个条目全部内容,希望文章能够帮你解决inno-setup – Inno设置在Windows 7下的hosts文件中添加一个条目所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)