Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. How do I log on (n/w connection) via a script?

How do I log on (n/w connection) via a script?

Scheduled Pinned Locked Moved IT & Infrastructure
questionc++comsysadmintools
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prcarp
    wrote on last edited by
    #1

    I've created a dial-up network connection and I am able to click on the icon, then click Dial, and successfully make a new internet connection. When I am done, I can right-click on the network icon and disconnect it. However, I need to do this from an application without human interaction. I don't know how to start this dialog (minimized) and tell it to dial. Furthermore, I don't know how to disconnect the link when I am finished. The connection is a GPRS modem connection where time/data can be costly. The application (on the laptop) needs to get online, transfer some data, and then hang up, all without user intervention. What is the proper way to do this? As an alternative, I can successfully write to the COM port, (AT+CGDCONT=1,"IP","internet2.voicestream.com" and then AT*99***1#") but then the ISP connection starts spewing PPP data. I don't know what the equivalent to PPPD is on Windows XP or how to transfer the COM port handle to the daemon. Any help or links on the matter would be greatly appreciated. All the searches I've investigated show how to do this with mouse clicks and nothing automated. Thanks, Paul PS: The script can be .BAT or C++/MFC classes (6.0)

    E P 2 Replies Last reply
    0
    • P prcarp

      I've created a dial-up network connection and I am able to click on the icon, then click Dial, and successfully make a new internet connection. When I am done, I can right-click on the network icon and disconnect it. However, I need to do this from an application without human interaction. I don't know how to start this dialog (minimized) and tell it to dial. Furthermore, I don't know how to disconnect the link when I am finished. The connection is a GPRS modem connection where time/data can be costly. The application (on the laptop) needs to get online, transfer some data, and then hang up, all without user intervention. What is the proper way to do this? As an alternative, I can successfully write to the COM port, (AT+CGDCONT=1,"IP","internet2.voicestream.com" and then AT*99***1#") but then the ISP connection starts spewing PPP data. I don't know what the equivalent to PPPD is on Windows XP or how to transfer the COM port handle to the daemon. Any help or links on the matter would be greatly appreciated. All the searches I've investigated show how to do this with mouse clicks and nothing automated. Thanks, Paul PS: The script can be .BAT or C++/MFC classes (6.0)

      E Offline
      E Offline
      Ed Poore
      wrote on last edited by
      #2

      Take a look at the netsh command this[^] article may help, although I couldn't get it to work in the brief time I tried it.


      If you're stuck in a rut: 1) Consult the documentation* 2) Google it 3) Ask a sensible question 4) Try an ancient ritualistic knowledge summoning (:badger::badger::badger:) dance :jig: 5) Phone :bob: * - If the documentation is MSDN > 6.0 then forget it!

      P 1 Reply Last reply
      0
      • E Ed Poore

        Take a look at the netsh command this[^] article may help, although I couldn't get it to work in the brief time I tried it.


        If you're stuck in a rut: 1) Consult the documentation* 2) Google it 3) Ask a sensible question 4) Try an ancient ritualistic knowledge summoning (:badger::badger::badger:) dance :jig: 5) Phone :bob: * - If the documentation is MSDN > 6.0 then forget it!

        P Offline
        P Offline
        prcarp
        wrote on last edited by
        #3

        Thanks Ed! This looks like it may do the trick.

        1 Reply Last reply
        0
        • P prcarp

          I've created a dial-up network connection and I am able to click on the icon, then click Dial, and successfully make a new internet connection. When I am done, I can right-click on the network icon and disconnect it. However, I need to do this from an application without human interaction. I don't know how to start this dialog (minimized) and tell it to dial. Furthermore, I don't know how to disconnect the link when I am finished. The connection is a GPRS modem connection where time/data can be costly. The application (on the laptop) needs to get online, transfer some data, and then hang up, all without user intervention. What is the proper way to do this? As an alternative, I can successfully write to the COM port, (AT+CGDCONT=1,"IP","internet2.voicestream.com" and then AT*99***1#") but then the ISP connection starts spewing PPP data. I don't know what the equivalent to PPPD is on Windows XP or how to transfer the COM port handle to the daemon. Any help or links on the matter would be greatly appreciated. All the searches I've investigated show how to do this with mouse clicks and nothing automated. Thanks, Paul PS: The script can be .BAT or C++/MFC classes (6.0)

          P Offline
          P Offline
          prcarp
          wrote on last edited by
          #4

          answer here[^] (RasDial)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups