How do I write (or update) \etc\hosts file? - Advanced Installer Community
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How do I write (or update) \etc\hosts file?

Hello Doug,

Simply make sure your installer is running elevated. On the Install Parameters page, did you make sure the installation is "Per machine only"?.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
hadas
Posts: 43
Joined: Mon Jan 06, 2014 10:53 am

Re: How do I write (or update) \etc\hosts file?

Hi,

I'm trying to update hosts file. I've create a search for hosts under System64 and the file is there.
I have Text File Update located under Windows value > Window > System64. I'm using append.
The installer is per machine fails if not administrator

The update is not happening. What can be the problem?

Thanks,
Hadas
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How do I write (or update) \etc\hosts file?

Hello Hadas,

This may happens if you want to change a file which from a 64-bit location within a 32-bit installer platform. Please note that when a 32-bit application writes or reads a value under the C:\Windows\System32 directory , the application reads from the C:\Windows\SysWOW64 directory.

So, you can create your package type as a Mixed 32/64-bit matching the platform which runs as a 32-bit package on 32-bit systems and as a 64-bit package on x64 systems. This wizard will launch when Mixed 32/64-bit matching the platform package type is selected in the Install Parameters page. You can reopen the wizard by using the [ ... ] button placed next to the “Package Type” option.

Also, you can take a look on the Folder paths article which may be useful to you.

If the behavior still persist, please send us the .AIP (project file) to support at advancedinstaller dot com and tell us the file's path which you want to modify.

Please let us know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hadas
Posts: 43
Joined: Mon Jan 06, 2014 10:53 am

Re: How do I write (or update) \etc\hosts file?

Thanks for your replay,

I'm using 32bit installation on 64 platform
I'm using folder system64
(from Folder path: System 64 System64Folder C:\Windows\system32 resolved only on 64-bit machines)
also if i'm using a search it finds the file

Hadas
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: How do I write (or update) \etc\hosts file?

Hello Hadas,

I've tested your scenario and using the Mixed 32/64-bit matching the platform package type fixed this. Have you tried this and the behavior still persist?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”