Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have a server that needs both a LAN and GPRS connection. We have configured the dial up connection in Windows but we need it to start whenever the server starts without user interaction and without a user logging on. Much like a service.

How can we do this?

It's a Windows 2008 Web Server Edition (R2)

share|improve this question
up vote 1 down vote accepted

Have a look at demand-dial interfaces in Routing and Remote Access Service. You can configure a connection as persistent and that should get you the behaviour you're looking for.

share|improve this answer
I can't find that... I forgot to mention it's a Web server edition – TimothyP Oct 22 '09 at 15:39

You may be able to do the following, but I do not have a test system to work with at this time.

Create a batch file with the following command:

@echo off
rasdial "Name of GPRS connection" [username [password]]

The username and password fields are optional and are only required if you didn't save the credentials for everyone when creating the connection. Of course, anyone with permissions could read the username and password from that file which may or may not be a problem.

Save the batch file somewhere you'll remember (like C:\Windows or C:\Scripts or something), run gpedit.msc, navigate to Computer Settings -> Windows Settings -> Scripts (Startup/Shutdown) and double click on Startup.

Once the Startup Properties dialog box loads, add a new script that points to the batch file created above (ex: C:\Windows\DialGPRS.cmd). and hit OK. On the next system reboot the computer will automatically run any scripts listed in the local group policy editor.

Since I am unable to test this, it may run the command and fail to dial the connection before the network or computer is ready to actually handle the connection. If that is the case you'll need to use two batch files instead. The two batch files allows us to get around a script timeout that could cause Windows to terminate our batch script if it took too long.

Batch file launched by the computer startup script:

start /min "" "C:\Windows\DialGPRS.cmd"

Batch file launched by the previous batch file:

@echo off
timeout 30
rasdial "Name of GPRS connection" [username [password]]

The first batch file is called by Windows during system startup. It launches the actual dial script as a different process and exits immediately so that your computer isn't waiting at the Running Computer Startup Scripts phase of startup. The timeout command (available in Server 2003/Vista/+ and higher only, not available in XP) takes the number of seconds you want to wait as its argument. In the example above it will wait for 30 seconds before attempting to dial the connection. Obviously this can be increased or decreased as necessary.

share|improve this answer
I will try this asap and mark it as the answer if it works, thank you! – TimothyP Oct 22 '09 at 18:08
Was this able to solve your problem? – Joshua Oct 28 '09 at 16:23

OK, here's a bit of a klugy solution so take it for what it's worth:

  1. Set the dial up connection to dial automatically.

  2. Set IE to use the dial up connection and to connect it automatically.

  3. Navigate to HKLM\Software\Microsoft\Windows\CurrentVersion\Run in the registry and add a new String Value

  4. Call the String Value whatever you like and add this as the data: ieplore.exe "ip address of server" (without the quotes).

This will cause IE to launch to the default web site on the server and dial the GPRS connection automatically whenever the server is rebooted.

Alternately you can set IE to launch to any web site you want, but it's probably safer to launch it to a web site on the server itself. The important thing is making IE launch and dial the GPRS connection automatically.

share|improve this answer
I think you're missing a "rig up an autologon" somewhere in there, because the legacy Run entries in the registry are parsed by Explorer.exe. – Evan Anderson Oct 22 '09 at 17:32
It would appear so. – joeqwerty Oct 22 '09 at 17:48
Thnx for the effort still :-) – TimothyP Oct 22 '09 at 18:06
Yeah, maybe something to keep in your pocket if other solutions don't come to bear. Happy to help anyway. – joeqwerty Oct 22 '09 at 18:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.