Automate dial-up connections

Q I read with great interest your August article on starting multiple programs with one batch file (Start multiple apps at once, p140). It was just what I needed to open Eudora, ICQ and other applications without all the double-clicking. Now I'm wondering if I can make that same batch file open my Dial-Up Networking connection. I realise it would need a built-in delay to wait for the connection to be established -- in my case, about 32 seconds (yes, I timed it).

- Doug Morgan

A Several other readers had similar questions. If you still use the DUN software that comes with Windows 95, the answer is no, you can't. But if you have DUN 1.2 or higher (downloadable from, you can connect to your Internet Service Provider in one click. That, combined with a simple DOS command, should solve all your problems.

To make your other Web-related applications wait until you've made the DUN connection, add the following line immediately below the line that launches your browser: choice /n /t:n,32 Continue waiting? The Choice command causes your system to pause and wait for a response. The /t switch tells the batch file to use the default choice ("n" in this example) after the specified number of seconds ("32" here). The prompt text ("Continue waiting?") is optional, and you can modify it to say whatever you want. Keep the DOS window out of your way by running the batch file in minimised form (choose Minimized from the Run menu on the Program tab of the batch file's Properties sheet).

The only thing this batch file doesn't do is shut down all the applications when you're done; you'll have to do that yourself, and then disconnect from your ISP by right-clicking the DUN icon on the taskbar and choosing Disconnect.

A few final tips - if DUN gives you a Connection Established dialogue box upon connecting, check Do not show this dialog box in the future and click Close. If you use Outlook Express for e-mail, you can make it automatically default to your inbox: choose Tools-Options, click the General tab,check the box for When starting, go directly to my 'Inbox' folder, and click OK.

If you use IE 4.x (in Windows 9x or NT), you can easily automate your DUN connection. First launch IE. A dialogue box will prompt you to decide between connecting and working offline. Check the Connect automatically box and click Connect. The next time you launch your browser, it will automatically dial and connect for you. To combine this process with opening your other online utilities, just add a line launching your browser (for example, start c:\progra~1\ie\iexplore.exe) to the beginning of your batch file.

If you use some other browser, start by double-clicking My Computer and then double-clicking the Dial-Up Networking icon. Next, double-click the icon for the connection you want to automate (your ISP icon). Make sure that your user name and password are entered properly and that the Save password box is checked. Full automation requires these settings; without them, you'll be prompted for information every time you try to connect. If all the settings look good to you, click Cancel. Otherwise, click Connect. Once you connect, the settings will be saved, so you can disconnect immediately.

Now return to the Dial-Up Networking window. With the icon for your ISP still selected, choose Connections-Settings. Look for the Prompt for information before dialing check box. If you don't see it, you're using the old DUN, and you need to download and install the latest version.

Once you've installed the latest DUN software, return to the Dial-Up Networking window, select your ISP icon, and choose Connections-Settings. Uncheck Prompt for information before dialing and click OK. To simplify launching this connection from a command line, make a shortcut: using the right button, drag the ISP icon to a convenient folder (such as the Command folder in the Windows folder), and choose Create Shortcut(s) Here. Then modify your batch file to launch this Shortcut. If your ISP icon is named My_ISP, for example, add the command start My_ISP to the beginning of your batch file. (You should add the complete path if your Shortcut isn't on the desktop, in a Start menu, or in the Windows Command folder.)

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Scott Dunn

PC World
Show Comments


James Cook University - Master of Data Science Online Course

Learn more >


Sansai 6-Outlet Power Board + 4-Port USB Charging Station

Learn more >



Back To Business Guide

Click for more ›

Brand Post

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Andrew Teoh

Brother MFC-L9570CDW Multifunction Printer

Touch screen visibility and operation was great and easy to navigate. Each menu and sub-menu was in an understandable order and category

Louise Coady

Brother MFC-L9570CDW Multifunction Printer

The printer was convenient, produced clear and vibrant images and was very easy to use

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?