问题
There is Windows Server 2003 machine which has many users to access. Each of them want to configure their own hosts file to redirect a hostname to certain IP address. (They are virtual machines with same hostname and different IP addresses owned by each user.)
C:\WINDOWS\system32\drivers\etc\hosts
Also, we cannot simply ask users to use IP address to connect because the hostname is configured and need to be used in an application. Can we have this user specific hosts file configured or any workaround?
回答1:
technically this is not possible...a simple programmatic work around could be to write a script and at user logon replace the file with whatever values you want. since most of the changes in the hosts file are read at runtime, you should be able to achieve the result you are expecting
来源:https://stackoverflow.com/questions/10310530/how-to-configure-user-specific-hosts-file-on-windows