Forum Discussion

error_log's avatar
error_log
Copper Contributor
Oct 14, 2022

Auto VPN Connection through Service and rasdial.exe

Hello!

 

Trying to create a Service on Windows Server 2019 (Non Domain) which will automatically connect to the VPN Profile but it doesn't work.

 

Created VPN Profile with a name AutoVPN.

 

Creating a service:
sc.exe create AutoVPN start= auto binPath= "C:\windows\system32\rasdial.exe AutoVPN AutoVPN-UserName AutoVPN-Password" DisplayName= "AutoVPN" depend= "lanmanworkstation" obj= "NT AUTHORITY\LocalService"

 

Service stopped and start exiting with error ID 1053.

 

Through the console this part is working: C:\windows\system32\rasdial.exe AutoVPN AutoVPN-UserName AutoVPN-Password.

 

Any advice how to create this service?

No RepliesBe the first to reply

Resources