| View previous topic :: View next topic |
| Author |
Message |
HCProfessionals
Joined: 18 Jun 2007 Posts: 166
|
Posted: Thu Dec 17, 2009 2:06 pm Post subject: [Paying For This] Creating a custom connection automatically |
|
|
I have been looking all over for a way to have autohotkey automatically create a dialup connection. Would it be possible by sending a command to rasphone.exe? Really need some help on this.
I will pay $20 by PayPal who can come up with this first. |
|
| Back to top |
|
 |
nulljector Guest
|
Posted: Thu Dec 17, 2009 2:52 pm Post subject: |
|
|
When you load up rasphone.exe, does the Network Connections dialog come up do you have to create one from scratch?
This could be easy for me to do for you, just have to figure out what dialogs are coming up for you and what criteria you need to fill in.
Will check back in a bit. |
|
| Back to top |
|
 |
HCProfessionals
Joined: 18 Jun 2007 Posts: 166
|
Posted: Thu Dec 17, 2009 3:02 pm Post subject: |
|
|
| I need this done in a command line sort of sense to automatically create the connection using script. I don't want to have to go through a wizard or anything to create a connection. |
|
| Back to top |
|
 |
nullJector
Joined: 17 Dec 2009 Posts: 15
|
Posted: Thu Dec 17, 2009 3:23 pm Post subject: |
|
|
| HCProfessionals wrote: | | I need this done in a command line sort of sense to automatically create the connection using script. |
Yes I was about to ask you if you'd rather run it from a commandline.
It may take some correspondance from you (so I have an idea of your input criteria).
I'm going to familiarize myself with the command usage. Will work on it now and post in a bit..
ttys |
|
| Back to top |
|
 |
wooly_sammoth
Joined: 12 May 2009 Posts: 634 Location: Gloucester UK
|
Posted: Thu Dec 17, 2009 3:43 pm Post subject: |
|
|
I can give no guarantee that this will work as I have of way of testing it at the moment.
I had a look at this website for Rasphone and used the command for "Dial a RAS connection".
| Code: |
DetectHiddenWindows, On
Run, %comspec%, , Hide
ControlSend, , cd [directory where Rasphone is]{Enter}, cmd
ControlSend, , RASPHONE [-v] -f PhoneBook_file -d "PhoneBook_entry" > output.txt{Enter}, cmd
|
This will run a hidden command line, send the Rasphone command to it and save the output to a text file.
You could then use | Code: | | Loop, Read, output.txt | to scan the text file for any errors or success etc.
If this doesn't work it should at least give some pointers.
Edit. Sorry nullJector, I didn't see your last post. Didn't mean to tread on your toes |
|
| Back to top |
|
 |
nullJector
Joined: 17 Dec 2009 Posts: 15
|
Posted: Thu Dec 17, 2009 4:16 pm Post subject: |
|
|
| wooly_sammoth wrote: | | Edit. Sorry nullJector, I didn't see your last post. Didn't mean to tread on your toes |
No worries
HCProfessionals, I was able to create a dialup connection using the below script. I noticed that rasphone creates a custom ini file called *.pbk. Once this file is created, the system automatically creates the new new dialup connection.
Please run the script and let me know if you get a dialup connection in your network connections.
Also can you let me know what OS this will be used on (probably should have asked 1st) ?
| Code: | pbkFile := A_AppDataCommon "\Microsoft\Network\Connections\Pbk\rasphone.pbk"
conName = New Custom Connection
phoneNum = 222-222-2222
pbkInfo=
(
[%conName%]
Encoding=1
Type=1
AutoLogon=0
UseRasCredentials=1
DialParamsUID=8180452
Guid=AFF52D61CB8A5E418C17BA5E6840F3DE
BaseProtocol=1
VpnStrategy=0
ExcludedProtocols=0
LcpExtensions=1
DataEncryption=8
SwCompression=1
NegotiateMultilinkAlways=0
SkipNwcWarning=0
SkipDownLevelDialog=0
SkipDoubleDialDialog=0
DialMode=1
DialPercent=75
DialSeconds=120
HangUpPercent=10
HangUpSeconds=120
OverridePref=15
RedialAttempts=3
RedialSeconds=60
IdleDisconnectSeconds=0
RedialOnLinkFailure=0
CallbackMode=0
CustomDialDll=
CustomDialFunc=
CustomRasDialDll=
AuthenticateServer=0
ShareMsFilePrint=0
BindMsNetClient=1
SharedPhoneNumbers=1
GlobalDeviceSettings=0
PrerequisiteEntry=
PrerequisitePbk=
PreferredPort=
PreferredDevice=
PreferredBps=0
PreferredHwFlow=0
PreferredProtocol=0
PreferredCompression=0
PreferredSpeaker=0
PreferredMdmProtocol=0
PreviewUserPw=1
PreviewDomain=0
PreviewPhoneNumber=1
ShowDialingProgress=1
ShowMonitorIconInTaskBar=1
CustomAuthKey=-1
AuthRestrictions=632
TypicalAuth=1
IpPrioritizeRemote=1
IpHeaderCompression=1
IpAddress=0.0.0.0
IpDnsAddress=0.0.0.0
IpDns2Address=0.0.0.0
IpWinsAddress=0.0.0.0
IpWins2Address=0.0.0.0
IpAssign=1
IpNameAssign=1
IpFrameSize=1006
IpDnsFlags=0
IpNBTFlags=1
TcpWindowSize=0
UseFlags=0
IpSecFlags=0
IpDnsSuffix=
NETCOMPONENTS=
ms_server=0
ms_msclient=1
MEDIA=serial
Port=COM1
ConnectBPS=0
DEVICE=modem
PhoneNumber=%phoneNum%
AreaCode=
CountryCode=1
CountryID=1
UseDialingRules=0
Comment=
LastSelectedPhone=0
PromoteAlternates=0
TryNextAlternateOnFail=1
HwFlowControl=0
Protocol=0
Compression=0
Speaker=1
MdmProtocol=0
)
FileAppend, % pbkInfo, % pbkFile
Return |
Still kind of messy but I will clean it up for you if this part works .
If all goes well, getting it to dial should be a peace of cake.
Let me know what happens and we can go from there. |
|
| Back to top |
|
 |
HCProfessionals
Joined: 18 Jun 2007 Posts: 166
|
Posted: Thu Dec 17, 2009 4:35 pm Post subject: |
|
|
[Changed] Read below
Last edited by HCProfessionals on Thu Dec 17, 2009 4:39 pm; edited 1 time in total |
|
| Back to top |
|
 |
HCProfessionals
Joined: 18 Jun 2007 Posts: 166
|
Posted: Thu Dec 17, 2009 4:39 pm Post subject: |
|
|
Ok, i did get one!
Needs:
- Username
- Password
- Shortcut on desktop
- Option to choose modem/device |
|
| Back to top |
|
 |
nullJector
Joined: 17 Dec 2009 Posts: 15
|
Posted: Thu Dec 17, 2009 5:14 pm Post subject: |
|
|
| HCProfessionals wrote: | | Ok, i did get one! |
Can you please confirm that you got a dialup connection with the above script I posted (just for my own clarity)?
Thanks,
Going to work on the UN, password, SC and Options next.
Will wait for your confirmation before continuing.. |
|
| Back to top |
|
 |
HCProfessionals
Joined: 18 Jun 2007 Posts: 166
|
Posted: Thu Dec 17, 2009 5:43 pm Post subject: |
|
|
| Sure did! |
|
| Back to top |
|
 |
nullJector
Joined: 17 Dec 2009 Posts: 15
|
Posted: Thu Dec 17, 2009 6:17 pm Post subject: |
|
|
| HCProfessionals wrote: | | Sure did! |
Great .
Please see PM for further details. |
|
| Back to top |
|
 |
|