如何从命令行在windows上创建拨号连接?
“创建”I do 不是指如何建立现有的连接,而是指如何创建新的拨号连接。常见的方法是使用新的连接向导(GUI),但我希望从命令行(脚本)创建(并删除)连接。
当需要时,我想创建拨号连接仅,因为如果没有可用的internet连接,窗口会弹出一个对话框,请求使用拨号连接进行连接,这会阻止请求连接的程序。如果拨号连接不存在,则不会发生这种情况。禁用拨号连接上的“默认连接”设置并不会阻止对话框弹出。
发布于 2014-02-27 17:53:19
您看过微软自己关于使用rasphone.exe建立拨号连接的页面吗?
http://support.microsoft.com/kb/555935
How to setup dial-up connection by rasphone.exe command
Click Start, type rasphone -a in the Start Search box, and then press Enter key.
Click Dial-up button on the How do you want to connect page.
Type the telephone number and destination name(e.g. Dial-Up), on the Type the telephone number to connect to page, click Next button to continue.
Type your user name and password, and make sure the Remember this password check box has been selected, on the Type your user name and password page, click Create button to continue.
Click Start, type rasphone -e <destination name> in the Start Search box, and then press Enter key.
Note: you must use the destination name which typed in step3, for example, Dial-Up.
On the Options tag of the Dial-up Properties, Clear the following selection:
a. Prompt for name and password, certificate, etc.
b. Include Windows logon domain.
c. Prompt for phone number.
then click Ok button.我在这里看到的问题是,它仍然涉及点击。这可能不是您梦寐以求的解决方案,但是对于这些部分,您可以创建一个简短的AutoHotkey脚本(或者整个过程)。
发布于 2012-01-06 10:44:48
看看rasdial,它可以根据您提供的参数创建拨号连接。
https://stackoverflow.com/questions/8756501
复制相似问题