Jan 19, 2010 at 2:10 PM
  • On 64-bit versions, Windows may use different system directories (I do not have access to a 64 bit windows system to check.)

    64-bit windows does use the same directory however if the App is running as a 32-bit app, the c:\windows\system32 directory gets a bit weird.  If you try and access c:\windows\system32 it gets silently redirected to: c:\windows\syswow64, however it appears that accessing c:\windows\system32\drivers\etc\hosts for example does map correctly to the correct hosts file.  To be safe it might be best to compile as 'Any CPU' and let the runtime run in 64 or 32 depending on the host.  This sometimes causes problems with the platform invoke stuff I've done before though.

  • Coordinator
    Jan 21, 2010 at 11:44 AM

    Thanks for this clarification. As I'm not sure it's a good idea to overwrite the 64 bits hosts file from a 32 bit application, the best course of action would then be for MacNS to write to a globally accessible file such as c:\macns\hosts, then use a 64 bits file editor (notepad ?) to open the appropriate hosts file for a 64 bit systems, and add an include directive in it.