lmhost supports #include statements, so you can include your own hosts file as follows:
//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 lmhosts statement := ExpandConstant('
source share