?
Solved

Any Registry Experts here?

Posted on 2003-03-23
4
Medium Priority
?
115 Views
Last Modified: 2012-05-04
Hi,

I am trying to script dial-up connections and I would like to know if there is a registry key that states whether a connection has been made successful or not. Example: When a connection is made a network connection icon appears in the task bar. Does anybody know the registry key for this? And or does anybody know how I can use a script to determine whether a connection has been successful or not.

I have tried using regmon to find the reg keys changed when a dial-up connection is made without any success.

The only other key that I have found which changes when dial-up connections are made is one for the modem status. When the modem is active ie dialling or connection made and in use the registry key changes from a 0 to a 1. I could use this key for scripting but it changes even when the modem is dialling so I am not sure exactly how I can sue this key to my advantage.

Any help would be much appreciated.

Mick
0
Comment
Question by:MickEv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
hendrik999 earned 300 total points
ID: 8190738
It's maybe easier to use rasdial.exe in a command (cmd) script and check the errorlevel of rasdial.
With rasdial you can dial DialUp Connections easily.
See rasdial /? for more info.

Create a file called e.g. dialup.cmd
An example dialup.cmd would be:

=========================
@Echo off
rasdial TestDialup myusername mypassword
if %errorlevel% == 0 goto SUCCESS
echo Connection NOT successfull
goto END

:SUCCESS
echo Connection successfull

:END
=========================

Hope this helps.
0
 

Author Comment

by:MickEv
ID: 8208796
Thanks for the info. I actually use rasdial but for some reason didn't think about trying to trap errorlevels returned - silly me.

Anyway I am now able to achieve what I was trying to do.

Thanks,

Mick
0
 

Author Comment

by:MickEv
ID: 8208800
Easy points for you! :)
0
 
LVL 3

Expert Comment

by:hendrik999
ID: 8216859
Glad it works, thanks for the 'easy' points.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Hey fellow admins! This time, I have a little fairy tale for you. As many tales do, it starts boring and then gets pretty gory. I hope you like it. TL;DR: It is about an important security matter, you should read it if you run or administer Windows …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question