8

I try to make a dial-up connection programatically. I tried with RASdial.exe and RASPhone.exe, Both does the same except RasDial.exe display the errors in console where as RasPhone.exe gives in user Interface.

Can Someone explain me the difference between Rasdial and Rasphone and also which is right one to make a dial-up connection. And I want the error messages in User Interface and not in console.

Please explain me in detail.

1 Answer 1

12

RASDIAL.exe is a wrapper around the Win32 RasDial API, and is typically used in situations where no user interface can be shown. This is why the errors are displayed in a console.

RASPHONE.exe is a wrapper around the Win32 RasPhonebookDlg API, and is typically used when an interface may be allowed. You'll have a lot more options for displaying the standard dialing interface if you use this.

They can both be used to dial a connection, it really just depends on which fits your particular needs for the application you're developing. Depending on how you want to display the error message, you may need to call the APIs rather than using the executables.

1
  • 1
    Note that rasphone -d works differently from manual run vs. batch run. When run from command line manually, it returns the control to the command prompt immediately while the connection happens in the background. When run in a batch, it waits for the connection to connect successfully before returning the control to the batch script. The difference could be misleading to someone testing the command out in preparation for batch scripting.
    – ADTC
    Mar 16, 2015 at 2:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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