Autologin Windows 10 clients
-
- OpenVpn Newbie
- Posts: 4
- Joined: Fri Aug 08, 2014 11:59 am
Autologin Windows 10 clients
Hi All,
we are using OpenVPN Access Server since several years on Windows 7 clients without any issue. The clients are configured with autologin.That is necessary because we ship newly installed laptops to roadrunners and we need an established VPN connection to allow the logon of those users with their AD account. Client have the standard OpenVPN Connect client from Access Server.
Autologin works perfectly on Windows 7 clients. But we need to move to Windows 10. On Windows 10 clients the autologin feature never works. If a VPN connection is established and the laptop will be shutdown, the VPN connection won't come up on next start. On the other hand, the autologin feature works if the computer will be restarted (no shutdown).
I searched the forum but didn't find any thread about that issue. Does anyone else is facing this problem and has already a solution for that?
Thanks and best regards
Daniel
we are using OpenVPN Access Server since several years on Windows 7 clients without any issue. The clients are configured with autologin.That is necessary because we ship newly installed laptops to roadrunners and we need an established VPN connection to allow the logon of those users with their AD account. Client have the standard OpenVPN Connect client from Access Server.
Autologin works perfectly on Windows 7 clients. But we need to move to Windows 10. On Windows 10 clients the autologin feature never works. If a VPN connection is established and the laptop will be shutdown, the VPN connection won't come up on next start. On the other hand, the autologin feature works if the computer will be restarted (no shutdown).
I searched the forum but didn't find any thread about that issue. Does anyone else is facing this problem and has already a solution for that?
Thanks and best regards
Daniel
- novaflash
- OpenVPN Inc.
- Posts: 1073
- Joined: Fri Apr 13, 2012 8:43 pm
Re: Autologin Windows 10 clients
I've just tested this on a Windows 10 system but when I do restart or shutdown, it doesn't matter, it comes back online by itself.
However, it is possible, likely even, that with a restart vs a shutdown and startup the startup process is a bit different and the Internet connection doesn't come online quite the same way, quite as quickly. It's possible that when the Connect Client starts the connection isn't up yet.
When you start the Connect Client while it's already loaded, it should trigger the connection to autostart. You could try adding the connect client icon to the windows start menu. That usually takes a bit before that gets triggered. Might be able to solve your problem that way.
However, it is possible, likely even, that with a restart vs a shutdown and startup the startup process is a bit different and the Internet connection doesn't come online quite the same way, quite as quickly. It's possible that when the Connect Client starts the connection isn't up yet.
When you start the Connect Client while it's already loaded, it should trigger the connection to autostart. You could try adding the connect client icon to the windows start menu. That usually takes a bit before that gets triggered. Might be able to solve your problem that way.
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.
-
- OpenVpn Newbie
- Posts: 4
- Joined: Fri Aug 08, 2014 11:59 am
Re: Autologin Windows 10 clients
Which client version do you use?
The client on our machine comes up after starting the laptop but remains disconnected. Also adding OpenVPN client to Windows autostart doesn't influence the behaviour. What version of Windows 10 do you have installed? On our side Windows 10 Pro 1709 is used.
The client on our machine comes up after starting the laptop but remains disconnected. Also adding OpenVPN client to Windows autostart doesn't influence the behaviour. What version of Windows 10 do you have installed? On our side Windows 10 Pro 1709 is used.
- novaflash
- OpenVPN Inc.
- Posts: 1073
- Joined: Fri Apr 13, 2012 8:43 pm
Re: Autologin Windows 10 clients
OpenVPN Connect Client 2.5.0.100 and 2.5.0.136 on Windows 10 Pro 1709 build 16299.125 English x64 with an auto-login type profile connected to Access Server 2.5.
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.
- novaflash
- OpenVPN Inc.
- Posts: 1073
- Joined: Fri Apr 13, 2012 8:43 pm
Re: Autologin Windows 10 clients
You might find this useful. If you like to live dangerously and accept command line script from strangers on the Internet, you will enjoy this one. It's pretty self-explanatory and harmless, it keeps looping until it manages to get the connect client in a 'connection established' state. If you like you can save this script somewhere as 'connect.cmd' on your Windows 10 machine, and create a shortcut to it that is set to run in minimized state, and then put that shortcut in the Startup folder of Windows. It will then run unobtrusively and keep doing its damnedest to get that connection started no matter what state your system is in. It exits once the connection is up, but if you want it to run forever and forever then replace the last line with "timeout 10 >nul & goto :main" so it always keeps checking.
Behold the fruits of my 2 minutes labor:
Behold the fruits of my 2 minutes labor:
Code: Select all
@echo off
set serverurl=vpn.yourserver.com
:main
ping -n 1 %serverurl% | find "TTL" >nul
if errorlevel 1 timeout 1 >nul & goto :main
"C:\Program Files (x86)\OpenVPN Technologies\OpenVPN Client\core\ovpncli.exe" Status | find "established" >nul
if errorlevel 1 "C:\Program Files (x86)\OpenVPN Technologies\OpenVPN Client\core\ovpncli.exe" Connect >nul
"C:\Program Files (x86)\OpenVPN Technologies\OpenVPN Client\core\ovpncli.exe" Status | find "established" >nul
if errorlevel 1 timeout 10 >nul & goto :main
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
- novaflash
- OpenVPN Inc.
- Posts: 1073
- Joined: Fri Apr 13, 2012 8:43 pm
Re: Autologin Windows 10 clients
Haha yeah, generally not considered too secure to accept scripts from stranger on the Internet.
Anyways, forgot to mention, this script only works for auto-login profiles, as user-locked profiles and server-locked profiles obviously need credentials to connect and this script provides none.
Anyways, forgot to mention, this script only works for auto-login profiles, as user-locked profiles and server-locked profiles obviously need credentials to connect and this script provides none.
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.
-
- OpenVpn Newbie
- Posts: 4
- Joined: Fri Aug 08, 2014 11:59 am
Re: Autologin Windows 10 clients
Thanks for the script. I already had a powershell script for work around. But the users should have the option to deactivate the VPN connection, which means it should not auto connect at next reboot.
Being confused that it works for you I started to investigate what's the difference in Win10 for reboot and shutdown. I came to this site https://superuser.com/questions/1265492 ... tup-on-off and tried shutting down windows with shutdown /s /t 0
Now after starting the computer the VPN connection was automatically established. That means OpenVPN Connect Client has problems to auto connect after hibernation.
Could you please check in your Windows 10 if hibernation is fully deactivated?
Being confused that it works for you I started to investigate what's the difference in Win10 for reboot and shutdown. I came to this site https://superuser.com/questions/1265492 ... tup-on-off and tried shutting down windows with shutdown /s /t 0
Now after starting the computer the VPN connection was automatically established. That means OpenVPN Connect Client has problems to auto connect after hibernation.
Could you please check in your Windows 10 if hibernation is fully deactivated?
- novaflash
- OpenVPN Inc.
- Posts: 1073
- Joined: Fri Apr 13, 2012 8:43 pm
Re: Autologin Windows 10 clients
I don't use hibernation and it makes perfect sense that things fail when that's used. You just need to kick off the connection again after coming back after hibernation. That's totally different from restarting or shutting down your system. Hibernation is hibernation, freezes all current processes, and when they come back, such a connection will logically fail and need to be restarted.
I'm still alive, just posting under the openvpn_inc alias now as part of a larger group.