Trying to create a vpn connection as a service in windows

Hi there,

I am trying to get VPN to connect at boot by adding it as a service.

Althought knowing a fair amount about server and networking, I am alien to scripting - so this might sound but i need some pointers with this as to what to do.

To add the service I opened cmd and typed this;


I typed this;
H:\>sc.exe create "Heavens-end" binPath= "C:\WINDOWS\system32\rasdial.exe"

and got this;
Creates a service entry in the registry and Service Database.
SYNTAX:
sc create [service name] [binPath= ] <option1> <option2>...
CREATE OPTIONS:
NOTE: The option name includes the equal sign.
type= <own|share|interact|kernel|filesys|rec>
(default = own)
start= <boot|system|auto|demand|disabled>
(default = demand)
error= <normal|severe|critical|ignore>
(default = normal)
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
(default = LocalSystem)
DisplayName= <display name>
password= <password>

So (me being fairly alien to this) typed this;
sc.exe create "VPN NAME" binPath= "C:\WINDOWS\system32\rasdial.exe" type=”start” =”boot” error=”normal” binPath=”BinaryPathName” group=”LoadOrderGroup” tag=”yes” obj=”matt” DisplayName=”matt” password=”password”

But cant get t to work
jonathanduane2010Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

Al JeeCommented:
Well, I have no experience in scripting but the below [in bold] looks wrong. What equals "boot"?

"C:\WINDOWS\system32\rasdial.exe" type=”start” =”boot” error=”normal” binPath=”BinaryPathName” group=”LoadOrderGroup” tag=”yes” obj=”matt” DisplayName=”matt” password=”password”
0
gheistCommented:
rasdial is not service executable itself.
you have to use srvany.exe
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
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.