Qia's LabVIEW Station Virry Test & Control

We talk about LabVIEW and HVAC

How to dial up?

=====================================================================

/* Dial a modem to page the system operator */
char modemstring[100]="ATDT"; //command to make the modem dial
strcat(modemstring,"555-1234"); //append the phone number to dial
strcat(modemstring,",,,,4242#"); //append pause(commas) followed by a page msg
OpenComConfig( ..parameters..); // open & configure the COMPORT
ComWrt(COMPORT, modemstring, strlen(modem
string) ); //dial,write to COMPORT
CloseCom(COMPORT); //close the COMPORT


=====================================================================

I found out how to do this without using the internet toolkit--by having the system execute vi run a batch file.

Windows NT, 2000, and XP all have rasdial.exe which controls Windows' dial-up adapters. Windows 95, 98, and ME need a freeware download of the rasdial equivolant: rasdial95.exe.

Here's example text from a batch file that will connect to the internet via a dial-up adapter:


@echo off
rasdial "My Connection" "username" password


where My Connection is the name of the dial-up adapter. After saving this as connect.bat (or something), you can run it from labview using the system execute vi.

A batch file with similar text can be made to disconnect:

@echo off
rasdial "My Connection" /disconnect


Tom

=====================================================================

RASDIAL (Dial Up Networking)

Manage RAS/DUN connections.

Dial a RAS connection:
   RASDIAL entryname [/PHONEBOOK:phonebookfile]
                [/PHONE:phonenumber] [username [password|*]] 
                [/CALLBACK:callbacknumber]
                [/DOMAIN:domain][/PREFIXSUFFIX]

Hang up a RAS connection:
   RASDIAL [entryname] /DISCONNECT

Display RAS Status
   RASDIAL

To use this command requires that Dial Up Networking Service be installed (via Control Panel - Networking)

The default location for PhoneBook entries is \winnt\system32\ras\

Related Commands:

RASPHONE - Manage RAS connections
RASMON - Windows 2000 GUI Resource Kit tool
CHECKRAS - SMS support tools

=====================================================================

Rasdial

You can automate the connection process for any Microsoft client by using a simple batch file and the rasdial command. The rasdial command starts a network connection by using a specified entry.

Syntax

rasdial connectionname [username [password | *]] [/domain:domain] [/phone:phonenumber] [/callback:callbacknumber] [/phonebook:phonebookpath] [/prefixsuffix]

The rasdial command disconnects a network connection by using the following syntax:

rasdial [connectionname] /disconnect 

Parameters

None : Used without options, rasdial displays the status of current connections.

connectionname : Specifies an entry in the current .pbk file, located in the systemroot\System32\Ras folder. If the connection name contains spaces or special characters, enclose the connection name in quotation marks (").

The Rasphone.pbk file is used unless the Personal Phonebook option is selected. If the Personal Phonebook option is selected, the file username.pbk is used. The name is shown on the Rasphone title bar when Personal Phonebook/p is selected. Numbers are appended if name conflicts occur.

username [password | *] : Specifies a user name and password with which to connect. If an asterisk is used, the user is prompted for the password, but does not display the characters typed.

/domain:domain : Specifies the domain the user account is located in.

If not present, the last value of the Domain field in the Connect To dialog box is used.

/phone:phonenumber : Substitutes the specified phone number for the entry's phone number in Rasphone.pbk.

/callback:callbacknumber : Substitutes the specified callback number for the entry's callback number in Rasphone.pbk.

/disconnect : Disconnects the specified entry.

/phonebook:phonebookpath : Specifies the path to the phonebook file. The default is systemroot\System32\Ras\username.pbk. You can specify a full path to the file.

/prefixsuffix : Applies the current TAPI location dialing settings to the phone number. These settings are configured in Telephony, which is located in Control Panel. This option is off by default.

Rasdial examples

To connect to the OFFICE entry in Rasphone.pbk, type:

rasdial office

To connect to the OFFICE 2 entry in Rasphone.pbk and specify a callback number, type:

rasdial "office 2" /callback:555-0100

To disconnect from the EAST OFFICE entry, type:

rasdial "EAST OFFICE" /d

 

Note

The following Rasphone.exe features are not supported with rasdial:

Entries that require Terminal mode user entry during the dial sequence.

Operator-assisted or manual dialing.


=====================================================================

RASPHONE (Dial Up Networking)

Manage Remote Access Service (RAS) connections.
This is a part of the Dial-Up Networking service, typically used to connect a PC to an Internet Service Provider.

Dial a RAS connection:
   RASPHONE [-v] -f PhoneBook_file -d "PhoneBook_entry" 

Hang up a RAS connection:
   RASPHONE [-v] -f PhoneBook_file -h "PhoneBook_entry" 

Display RAS Status dialogue box
   RASPHONE -S

Other RAS options:
   RASPHONE [-v] -f PhoneBook_file options "PhoneBook_entry"

OPTIONS
   -a   : Add new PhoneBook entry
   -e   : Edit an existing PhoneBook entry
   -c   : Clone an existing PhoneBook entry
   -r   : Delete/remove an existing PhoneBook entry
   -v   : Disable - 'grey out' the option to rename the PhoneBook_entry

To use this command requires that Dial Up Networking Service be installed (via Control Panel - Networking)

The default location for PhoneBook entries is %SystemRoot%\System32\ras\

============================================================================================

Rasdial

You can automate the connection process for any Microsoft client by using a simple batch file and the rasdial command. The rasdial command starts a network connection by using a specified entry.

Syntax

rasdial connectionname [username [password | *]] [/domain:domain] [/phone:phonenumber] [/callback:callbacknumber] [/phonebook:phonebookpath] [/prefixsuffix]

The rasdial command disconnects a network connection by using the following syntax:

rasdial [connectionname] /disconnect 

Parameters

None : Used without options, rasdial displays the status of current connections.

connectionname : Specifies an entry in the current .pbk file, located in the systemroot\System32\Ras folder. If the connection name contains spaces or special characters, enclose the connection name in quotation marks (").

The Rasphone.pbk file is used unless the Personal Phonebook option is selected. If the Personal Phonebook option is selected, the file username.pbk is used. The name is shown on the Rasphone title bar when Personal Phonebook/p is selected. Numbers are appended if name conflicts occur.

username [password | *] : Specifies a user name and password with which to connect. If an asterisk is used, the user is prompted for the password, but does not display the characters typed.

/domain:domain : Specifies the domain the user account is located in.

If not present, the last value of the Domain field in the Connect To dialog box is used.

/phone:phonenumber : Substitutes the specified phone number for the entry's phone number in Rasphone.pbk.

/callback:callbacknumber : Substitutes the specified callback number for the entry's callback number in Rasphone.pbk.

/disconnect : Disconnects the specified entry.

/phonebook:phonebookpath : Specifies the path to the phonebook file. The default is systemroot\System32\Ras\username.pbk. You can specify a full path to the file.

/prefixsuffix : Applies the current TAPI location dialing settings to the phone number. These settings are configured in Telephony, which is located in Control Panel. This option is off by default.

Rasdial examples

To connect to the OFFICE entry in Rasphone.pbk, type:

rasdial office

To connect to the OFFICE 2 entry in Rasphone.pbk and specify a callback number, type:

rasdial "office 2" /callback:555-0100

To disconnect from the EAST OFFICE entry, type:

rasdial "EAST OFFICE" /d

 

Note

The following Rasphone.exe features are not supported with rasdial:

Entries that require Terminal mode user entry during the dial sequence.

Operator-assisted or manual dialing.


=========================================================================================

RASPHONE


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Manage RAS/DUN connections.


Syntax

RASPHONE [-v] -f PhoneBook_file [-a] [-c] [-d] [-e] [-h] [-r] "PhoneBook_entry"

Display RAS Status dialogue box:

RASPHONE -S


Parameters
"PhoneBook_entry" (NT4)
Phone book entry.

Switches
-a (NT4)
Add new PhoneBook entry.
-c (NT4)
Clone an existing PhoneBook entry.
-d (NT4)
Dial a RAS connection.
-e (NT4)
Edit an existing PhoneBook entry.
-f PhoneBook_file (NT4)
Specify phone book file name.
-h (NT4)
Hang-up a RAS connection.
-r (NT4)
Delete/remove an existing PhoneBook entry.
-S (NT4)
Display RAS Status dialogue box.
-v (NT4)
Disable - 'grey out' the option to rename the PhoneBook_entry.

Related

RASDIAL - Manage RAS connections.


Notes

To use this command requires that Dial Up Networking Service be installed (via Control Panel - Networking).

The default location for PhoneBook entries is \winnt\system32\ras\


Examples

none.


Errorlevels

none.


Availability
External Dial-up Networking
DOS
none
Windows
none
Windows NT
NT4
======================================================================================

RASDIAL


Description | Syntax | Parameters | Switches | Related | Notes | Examples | Errorlevels | Availability

Automates the connection process for any Microsoft client.


Syntax

RASDIAL connection_name [user_name [{password | *}]] [/callback:callback_number] [/domain:domain] [/phone:phone_number] [/phonebook:phonebook_path] [/prefixsuffix]

RASDIAL [connection_name] [/d[isconnect]]

Displays status of current connections:

RASDIAL


Parameters
connection_name (NTXP)
Required when connecting to a phonebook (.pbk) entry. Specifies an entry in the current .pbk file, located in the systemroot\System32\Ras folder. If the connection_name contains spaces or special characters, use quotation marks around the text.
The Rasphone.pbk file is used unless the Personal Phonebook option is selected. If the Personal Phonebook option is selected, the file UserName.pbk is used. The name is shown on the Rasphone title bar when Personal Phonebook/p is selected. Numbers are appended if name conflicts occur.
user_name [{password | *}] (NTXP)
Specifies a user_name and password with which to connect. If an asterisk is used, the user is prompted for the password, but the characters typed do not display.

Switches
/callback:callback_number (NTXP)
Substitutes the specified callback number for the entry's callback number in Rasphone.pbk.
/d[isconnect] (NTXP)
Required when disconnecting. Disconnects the specified entry.
/domain:domain (NTXP)
Specifies the domain in which the user account is located. If unspecified, the last value of the Domain field in the Connect To dialog box is used.
/phone:phone_number (NTXP)
Substitutes the specified phone number for the entry's phone number in Rasphone.pbk.
/phonebook:phonebook_path (NTXP)
Specifies the path to the phonebook file. The default is systemroot\System32\Ras\UserName.pbk. You can specify a full path to the file.
/prefixsuffix (NTXP)
Applies the current TAPI location dialing settings to the phone number. These settings are configured in Telephony, which is located in Control Panel. This option is turned off by default.

Related

none.


Notes

none.


Examples

none.


Errorlevels

none.


Availability
External
DOS
none
Windows
none
Windows NT
NTXP NT2003

posted on 2005-06-23 02:41  LabVIEW开发者  阅读(903)  评论(0编辑  收藏  举报

导航