Creating New DUN Connection
Keywords: IntControl(43,0,0,0,0)
RE: Creating a New DUN Session:
OK, kids. Here is the final outcome. I was able to code for users that might not have a modem installed - or if they try to create a session that already exists. Hope this helps someone. I had to get this done in a hurry, so I didn't have time to learn/mess with the control manager extender.Run("rundll32.exe"," rnaui.dll,RnaWizard") WinWaitExist("Welcome to",2) SendKeysTo("Welcome to","!n") While WinExist("Make New") == @FALSE If WinExist("Install New") == @TRUE then WinClose("Install New") WinClose("Welcome to") AskYesNo("ERROR","You currently do not have a modem configured.%@CRLF%Please install one in the control panel and re-run this utility.") EXIT EndIf EndWhile SendKeysTo("Make New Connection",ConnName) SendKeysTo("Make New Connection","!n") If WinExist("Dial-Up Net") == @TRUE then SendKeysTo("Dial-Up Net","{sp}") WinClose("Make New") Message("ERROR!","This utility has already been run.%@CRLF%Remove the old one first if you wish to recreate the session.%@CRLF%Program must exit.") EXIT EndIF SendKeysTo("Make New Connection",AreaCode) SendKeysTo("Make New Connection","{tab}") SendKeysTo("Make New Connection",Number) SendKeysTo("Make New Connection","!n") SendKeysTo("Make New Connection","{enter}")
Question:
I am trying to send key strokes to the NT Dial-Up Networking window (C:\WINNT\SYSTEM32\RASPHONE.EXE).The problem I have is that the keystrokes are not being sent until the window opened by RASPHONE is closed? Am I doing something obviously wrong. This is the script..
----------------------------------------- Run("C:\WINNT\SYSTEM32\RASPHONE.EXE", "") WinWaitExist("Dial-Up Networking", 0) SendKeysTo("~Dial-Up Networking","!n") -----------------------------------------I have tried various values for the timeout.Answer:
I seem to recall that this is one of the few cases where addingIntControl(43,0,0,0,0)to the top of a script helps.
Article ID: W14153Filename: Creating New DUN Connection.txt