How to run ipconfig in W2k?

Discussion in 'Ruby' started by Todd Gardner, Jun 28, 2004.

  1. Todd Gardner

    Todd Gardner Guest

    Hello Everyone,

    Or for that matter, how can I run a given command as if I entered it
    into the DOS window?

    Example:
    C:\Documents and Settings\tnt>ipconfig

    Windows 2000 IP Configuration

    Ethernet adapter Local Area Connection:

    Connection-specific DNS Suffix . :
    IP Address. . . . . . . . . . . . : 192.168.1.115
    Subnet Mask . . . . . . . . . . . : 255.255.255.0
    Default Gateway . . . . . . . . . : 192.168.1.1

    Thank you,

    Todd
     
    Todd Gardner, Jun 28, 2004
    #1
    1. Advertising

  2. il 28 Jun 2004 03:25:56 -0700, (Todd Gardner) ha
    scritto::

    >Hello Everyone,
    >
    >Or for that matter, how can I run a given command as if I entered it
    >into the DOS window?


    C:\Documents and Settings\gabriele>irb
    irb(main):001:0> str= `ipconfig`
    => "\r\nConfigurazione IP di Windows\r\n\r\n\r\nScheda Ethernet
    Connessione alla
    rete locale (LAN) 3:\r\n\r\n Suffisso DNS specifico per
    connessione: \r\
    n Indirizzo IP. . . . . . . . . . . . . : 10.0.0.1\r\n
    Subnet mask
    . . . . . . . . . . . . . : 255.255.255.0\r\n Gateway
    predefinito . . .
    .. . . . . . : 10.0.0.2\r\n"

    Or IO.popen. Or system()
     
    gabriele renzi, Jun 28, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alex Kilpatrick

    Re: ASP.NET problem after installing W2K SP4

    Alex Kilpatrick, Jul 3, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    387
  2. Joe Flynt
    Replies:
    5
    Views:
    743
    Dennis Lee Bieber
    Nov 9, 2003
  3. joblack
    Replies:
    2
    Views:
    1,420
    joblack
    Jun 7, 2010
  4. Todd Gardner

    get same info as ipconfig?

    Todd Gardner, Jun 28, 2004, in forum: Ruby
    Replies:
    5
    Views:
    252
    Daniel Berger
    Jun 30, 2004
  5. Cosmic Cruizer

    TieRegistry with IPConfig

    Cosmic Cruizer, Apr 2, 2008, in forum: Perl Misc
    Replies:
    0
    Views:
    101
    Cosmic Cruizer
    Apr 2, 2008
Loading...

Share This Page