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 http://www.microsoft.com), 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 PC World newsletter!

Error: Please check your email address.

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Scott Dunn

PC World
Show Comments

Most Popular Reviews

Latest News Articles

Resources

PCW Evaluation Team

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Aysha Strobbe

Windows 10 / HP Spectre x360

Ultimately, I think the Windows 10 environment is excellent for me as it caters for so many different uses. The inclusion of the Xbox app is also great for when you need some downtime too!

Mark Escubio

Windows 10 / Lenovo Yoga 910

For me, the Xbox Play Anywhere is a great new feature as it allows you to play your current Xbox games with higher resolutions and better graphics without forking out extra cash for another copy. Although available titles are still scarce, but I’m sure it will grow in time.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?