Can anyone help me get a simple batch file to work please?
I'm trying to write a file that will be integrated with Windows Scheduler to auto reconnect my VPN when the PC
comes out of sleep mode. For some reason, Windows always disconnects the VPN when entering sleep/hibernate.
Have done a lot of "Googling" on this and found the following . .
I've written this but cannot get it to work. The Command Window flashes up, but nothing happens. It seems straightfoward - but not for me!
If anyone knows a better way of getting the VPN to auto reconnect after coming out of sleep I would be grateful. It would also be beneficial
if it auto reconnects at boot time to save having to log in separately.
Thanks for the info, however, I have only one tab available in device manager - network adapter and that is a General Tab under properties. No power managment tab at all. In fact, it's the same for everything in the Device Manager window. Selecting properties just gives me a General Tab.
If I can get to what your describing I think it should work. I assume unticking allow the computer to switch off . . . would prevent indows disabling the VPN?
Don't know what I did yesterday - trying too hard after a long nightshift I think.
The Power Management Option Tab is there for the network adapters and "allow computer to switch off off" is now unticked.
However it still disconnects the VPN in Hibernate. Have also tried Sleep instead of hibernate - same.
Previously I installed OpenVPN and have tried to keep this active during sleep with no luck. More Googling and I edited the Config file and added a line keepalive 10 120
That didn't work either. I just added the line in the Config File to what was already there. Don't know if this is correct as I don't have a clue about writing these or batch files.