Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 hosts files on my win7 machine that i switch manually (.bat file run as administrator) when i'm either in the company vpn or connected to the comany network directly.

What i would want is an option at boot-time to be able to make this selection. Preferebly a selection that has a default and a timeout.

How would i do that?

share|improve this question
why do you need switch hosts file when you connected/disconnected VPN ? – LiuYan 刘研 Aug 3 '12 at 13:18
i can only reach some of the servers via a vpn-ip-address when i'm connected over vpn. When i'm directly connected to the network those ips are not available (and vice versa). There is no DNS service that would help me here. – BigBlackDog Aug 3 '12 at 13:28
are you using hostname instead of IP address to access the servers? – LiuYan 刘研 Aug 3 '12 at 13:34
yes, i do that to transparently access a svn-repo e.g. – BigBlackDog Aug 3 '12 at 13:42
would you like to connect the SVN server with it's public IP address no matter whether you're connected the VPN or not ? (so that you don't need to switch hosts file) – LiuYan 刘研 Aug 3 '12 at 13:53

You must log in to answer this question.

Browse other questions tagged .