auto connect vpn

I have been messing with this for ages  I have vpn up and running all good   set up task sch.  but no connect I can see the task trying to connect so I have a setting wrong somewhere,  can anyone go through the set up exactly for me on task scheduler- some say rasdial.exe some say system 32 or programs     on windows10pro please help it should be quite simple but wont start   my setting in task scheduler are name vpn connection configure for W10    trigger  connect at log on wait 10 secs    action start a program  C:\Windows\System32\rasdial.exe  arguments "purevpn"usernamepassword no spaces    start only if my local network is available    settings allow to run on demand   and do not start a new instance
mike o'reillyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rob WilliamsCommented:
I did a blog article a while back on automating with RASdial which  may be of some help:
https://blog.lan-tech.ca/2013/06/08/rasdial-automate-vpn-connections/

If the device is domain joined the following is a better option:
https://blog.lan-tech.ca/2012/04/29/connect-to-windows-vpn-at-logon/
0
McKnifeCommented:
Please be clear about the details, "usernamepassword no spaces" - is not understandable.
1
mike o'reillyAuthor Commented:
usernamepassword  is it really no spaces or quotes.  I am thinking this needs to be entered in a specific way and this is where I am going wrong how do I enter this in the argument in the correct way
0
Challenges in Government Cyber Security

Has cyber security been a challenge in your government organization? Are you looking to improve your government's network security? Learn more about how to improve your government organization's security by viewing our on-demand webinar!

McKnifeCommented:
"run only when the user is logged on" needs to be checked. Then, no password will be asked for. As username, take your own user's name.
0
mike o'reillyAuthor Commented:
I move the connection name into the arguments box and now it is asking for pass and user I notice Mr Burchette also said he had to put it in at the last.   it sounds right to me,  even if I am logged in I still have to enter these to connect, even though this is actually done automatically if you tick remember my details in the set up   I have tried   [/Uooooooooo[/Pooooooo]]  and various others but I cant get this syntax right
0
McKnifeCommented:
Look, make screenshots of what you have and upload them - we will see clearer, then.
0
mike o'reillyAuthor Commented:
I need to know the exact correct layout to put username and password in the arguments box.  I have asked several people this and get a different answer every time.
0
Rob WilliamsCommented:
RASdial is intended for use with a Windows VPN client.  I am assuming you are using a product called PureVPN.  If so I do not believe it will work.

With a windows VPN client the format would be:
(Assuming the VPN connection name is Office1}

RASdial   office1  username   password

You may need to add the domain name, if so:
RASdial   office1  username   password   /domain:YourDomainName

If you replace the password with an    *     it will ask you for the password at logon.
Only the password is case sensitive.
By no spaces, they mean no spaces in the user name.  For example a username of  Bob Smith is unacceptable, but  putting it quotes may work such as  "Bob Smith"

As mentioned I am almost certain PurVPN  ( https://www.purevpn.com ) will not work with RASdial. If using PureVPN you would have to ask their support team how to run the program as a service if you want to auto connect.  You may be able to do so with Microsoft's instsrv.exe and srvany.exe, but that can be a frustrating process to get running.
https://support.microsoft.com/en-us/help/137890/how-to-create-a-user-defined-service
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mike o'reillyAuthor Commented:
thank you ROB that was all I needed it is now working fine.
 Now can you further help me with the fact that it wont start on second user,, trigger is set to any user at log on oddly enough this was why I removed the app in the first place that would not auto connect second user either
0
Rob WilliamsCommented:
Will it start manually for other users?
0
mike o'reillyAuthor Commented:
cant see it in the task manager nor listed in active tasks
0
McKnifeCommented:
Mike, 2 days ago you said, you saw my solution in the other thread and you would like to use it, but you fail. I ask you to show a screenshot of your settings, again. The thread has another comment at the end where someone writes
run program : C:\Windows\System32\rasdial.exe
Arguments: "MyDumbass VPN Connection Name" username Pa55word
is what he used successfully.
0
Rob WilliamsCommented:
I was asking if the user can manually start the VPN connection.  If not it is a problem with the install of the VPN service and possibly profile.  If they can it is a problem with the scheduled task.
0
mike o'reillyAuthor Commented:
No not really Rob Williams sorted it out for me it was just the clarity of how to enter the user and pass in the arguments once I put in the spaces it worked, (boy people talk some rubbish about how to do this on other sites)  except that is for second user. could not get this to work on any user group.  I found the easiest way around this was to create a second task for the other user.  this has done the trick both users run at log on now.  
I am no expert by any means but this does the job..
So can you see any problems with that
Capture.PNG-4.PNG
Capture.PNG-5.PNG
Capture.PNG-06.PNG
0
Rob WilliamsCommented:
More often it is applied using a batch file in the all users start menu than a task.  It is shown it the link I provided in my first comment.
Glad to hear it is working.
0
mike o'reillyAuthor Commented:
thank you for your support guys and let me apologise for my slow response (mother ill ) and spend a lot of time out of connection range
I found no problem setting up a task but could not get this entry layout correct due to bad advice from other sites. I understand that you could not understand, what I was actually asking. I was glad to know that I was at least right and the user and pas was the problem.

thanks again all working now
Mike
0
Rob WilliamsCommented:
Thanks Mike.  Glad to hear it is working.  Hope you mother recovers soon.  Family comes first.

Are you using PureVPN?  I didn't know RASdial would work with a 3rd party app.  If so good to know.
Cheers!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VPN

From novice to tech pro — start learning today.