PC SOFT
ONLINE REPOSITORY
FOR WINDEVWEBDEV AND WINDEV MOBILE

Home |  | Sign in | English US
WD Configuring a remote access
Published by Boller
in the category Tools
New features



Description
WD Configuring a remote access

sInsFile is string = ""
sCountryCode is string = ""
sCountryName is string = ""

// Define the name of the remote access
sInsFile = fCurrentDir() + "\" + AccessStatic + ".ins"

IF AccessStatic = "" THEN
// The name of the .ins file must be specified
Info("The name of the .ins file must be specified")
ReturnToCapture(AccessStatic)
END

// Create the parameter file (.ins) to create the configuration of a remote access
// Entry_Name = Name that will be displayed in the panel for remote network access
INIWrite("Entry", "Entry_name", AccessStatic, sInsFile)
IF ErrorOccurred THEN
Error("Unable to save the parameters in the file " + sInsFile)
ELSE
// Define the advanced options for the type of server
INIWrite("Server", "Type", "PPP", sInsFile) // Type of remote access server
INIWrite("Server", "SW_Compress", "No", sInsFile) // Enable the software compression (yes/no)
INIWrite("Server", "PW_Encrypt", "No", sInsFile) // Asks for an encrypted password (yes/no)
INIWrite("Server", "Disable_LCP", "No", sInsFile)
INIWrite("Server", "Negotiate_TCP/IP", "Yes", sInsFile) // Indicates whether the TCP/IP network protocol is allowed (yes/no)

// Define the settings of the TCP/IP protocol
INIWrite("TCP/IP", "Specify_IP_Address", "No", sInsFile) // Specify an IP address (yes/no)
INIWrite("TCP/IP", "Specify_Server_Address", "No", sInsFile) // Specify the addresses of the DNS servers (yes/no)
INIWrite("TCP/IP", "DNS_Address", "", sInsFile) // Address of the primary DNS server (Ex: 192.168.1.1)
INIWrite("TCP/IP", "DNS_Alt_Address", "", sInsFile) // Address of the secondary DNS server (Ex: 192.168.1.10)
INIWrite("TCP/IP", "IP_Header_Compress", "No", sInsFile) // Compression of IP header (yes/no)
INIWrite("TCP/IP", "Gateway_On_Remote", "Yes", sInsFile) // Default gateway for remote network (yes/no)

// Define the Proxy parameters
INIWrite("Proxy", "HTTP_Proxy_Server", "", sInsFile) // Address of Proxy server for the HTTP service (ex: proxy.lgm.ac-grenoble.fr:3128)
INIWrite("Proxy", "FTP_Proxy_Server", "", sInsFile) // Address of proxy server for the FTP service (ex: proxy.lgm.ac-grenoble.fr:3128)
INIWrite("Proxy", "Gopher_Proxy_Server", "", sInsFile) // Address of Proxy server for the Gopher service (ex: proxy.lgm.ac-grenoble.fr:3128)
INIWrite("Proxy", "Secure_Proxy_Server", "", sInsFile) // Address of the Proxy server for the Security service (ex: proxy.lgm.ac-grenoble.fr:3128)
INIWrite("Proxy", "Socks_Proxy_Server", "", sInsFile) // Address of Proxy server for the Socks service (ex: proxy.lgm.ac-grenoble.fr:3128)
INIWrite("Proxy", "Use_Same_Proxy", "Yes", sInsFile) // Specify whether the same server will be used for all the services (yes/no)
INIWrite("Proxy", "Proxy_Enable", "0", sInsFile) // Enable or not the use of the servers (0/1)
INIWrite("Proxy", "Proxy_Override", "", sInsFile) // Indicates the addresses for which the use of the Proxi servers is not allowed

// Define the parameters of the user
INIWrite("User", "Name", StrName, sInsFile) // Login for connecting to the remote access server
INIWrite("User", "Password", PasswordCap, sInsFile) // Password

// Define the telephony parameters
INIWrite("Phone", "Dial_As_Is", "No", sInsFile) // Dial the number without the area code (yes/no)
INIWrite("Phone", "Phone_Number", TelephoneCap, sInsFile) // Number for accessing the remote network, your provider
INIWrite("Phone", "Area_Code", CodeStatic, sInsFile) // Zone code

// Extract the name of the country
sCountryName = Left(CountryCap[CountryCap], Position(CountryCap[CountryCap], "(")-1)

INIWrite("Phone", "Country_Code", sCountryName, sInsFile) // Dialing code of the country

// Extract the dialing code of the country
sCountryCode = Middle(CountryCap[CountryCap], Position(CountryCap[CountryCap], "(")+1)
sCountryCode = Left(sCountryCode, Length(sCountryCode)-1)

INIWrite("Phone", "Country_ID", sCountryCode, sInsFile) // Dialing code of the country

// Define the settings
INIWrite("ConnectionSettings", "ApplyInsToConnection", AccessStatic, sInsFile)

END

IF YesNo("The file " + AccessStatic + ".ins is created." + CR + "Do you want to run it?") THEN
// Open the .ins file in the associated application
ShellExecute(sInsFile)
IF ErrorOccurred THEN
// The document cannot be opened
Error("Error running the file " + sInsFile)
END
END

Close()
Illustrations, screen shots
none
none
User reviews
(To evaluate this resource, click 'Write a review')
No review or comment? Be the first one!