Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.