CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2000
    Location
    Netherlands
    Posts
    71

    Win2K Getting IP adresses and hostnames

    Hi,

    How do I retrieve the IP address and optional the host name (can be done by a PING) for each active network and dial-up connection on a Win2K machine?



    Jeroen.


  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Win2K Getting IP adresses and hostnames

    Try

    shell to "IPCONFIG /ALL > INFO.TXT" then read the INFO.TXT file for your information.


    For some reason SHELL "ipconfig.exe /all > file.txt" does not work but
    SHELL "command.exe /c ipconfig.exe /all > file.txt" does.




    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Oct 2000
    Location
    Netherlands
    Posts
    71

    Re: Win2K Getting IP adresses and hostnames

    Hi,

    There's no possibility to use a shell, the system that's running the application is loaded with policies and the application that needs the address is run as a service.

    Since the used connection might be any kind of IP connection (LAN, WAN, Dial-Up) the address can change dynamically when using Dial-Up. It's a bit strange to pop-up a shell every minute or so. That will become highly anoying.

    Thanks for your reply.

    Jeroen.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured