Why can't I see hosts file on Win2019 systems?

I’m trying to using the following (In WebUI) to get lines from the hosts file on a Win2019 server:

lines of file "hosts" of folder "C:\Windows\System32\drivers\etc"
lines of file "hosts" of folder (pathname of system folder  & "\drivers\etc")

I check for the existence of the folder:
exists folder (pathname of system folder & "\drivers\etc")     returns false
exists folder (pathname of system folder & "\drivers")     returns true

I know the file is there,

Am I just missing something obvious?

Thanks,
Bob_K

32-bit redirection strikes again…

Try

lines of file "hosts" of folder "drivers\etc" of system x64 folder

or

lines of file "hosts" of folder "drivers\etc" of native system folder

3 Likes

@trn That solved my problem!

Thanks,
Bob_K