I have two networks: work and home. The work subnet is 192.168.0.x whereas home's subnet is 192.168.1.x

At work I have two mapped drives but at home I don't have either. Any time I open explorer at home or mistakenly hover a file over those drives, windows hangs whilst attempting to connect to the drive. I'm currently using a script which decides whether or not to remove/map the drives based on whether or not 192.168.0.1 can be pinged (work router). The problem is that for some reason based on the event trigger of "connecting/disconnecting to/from a network" multiple instances get run at once and just hang there.

All things considered I'd like a more elegant solution. Is there not a way of changing the timeout for mapped drives? Is it possible to have a 'set configuration' in windows where that configuration has permanently mapped network drives and another configuration doesn't have them at all; something like a 'hardware profile'? I also have other programs I'd like to turn on/off based on my network location.

link|improve this question

56% accept rate
feedback

2 Answers

I don't know about a "hardware profile" but we have shared network drives that are accessible anywhere via OpenVPN. If you have any control over your work's firewall, it seems like that would be the route to go.

Cheers

link|improve this answer
feedback

I actually did a workaround; I found out how to merge networks (wireless and wired) so that I could finally use the task scheduler's 'conditions' in such a way that allowed me to run a script only when connected to work and run a separate 'disconnect' script when connected at home.

Both scripts are set to run on "workstation unlock" and are set to run as soon as the conditions are available even if it fails.

To merge networks if anyone is interested:

Go to "Network and Sharing Center"
Click on the icon for the network you're currently on (under "active networks")
Click "Merge or delete network locations" at the bottom of the popup window.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.