CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2011
    Posts
    17

    Talking Displaying live information

    Hi guys.

    I have created a lovely dobley batch file to automate a long process at work. Now however I am looking for a way to display real-time data of the computer configuration.

    This would be simple, no user input - no modification - no login. Open the executable and it will display

    PC Name: DEVICE01
    IP Address: 192.168.1.1
    If drive X is mapped to a specific directory (Mapped: Yes/No)

    I'm a newbie to C++ but familiar with other languages (I'm a web developer by hobby) and want to start learning a new language.

    I am aware of the DOS commands that can produce the same result, unfortunately though it is important that the output is as simple as possible, and unfortunately there's a little too much 'gibberish' for non-technical guys. I need the response to be direct as shown above.

    This is important as we may have technicians doing on-site repairs and we would prefer to shy away from additional training. This live information would simply tell them what computer they are working on. And it would help us resolve any unforeseen issues - such as if the computer name was DEVICE04 but the IP ended in .03

    Any help would be greatly appreciated.
    Last edited by Faaal; October 14th, 2011 at 08:12 AM.

  2. #2
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: Displaying live information

    Without C++ even you can get those information from dos commands.

    ie: hostname, ipconfig
    ◄◄ hypheni ►►

  3. #3
    Join Date
    Aug 2011
    Posts
    17

    Re: Displaying live information

    Thanks for the reply hypheni, please see above as I have edited my original post now.
    Last edited by Faaal; October 14th, 2011 at 08:10 AM.

  4. #4
    Join Date
    Aug 2011
    Posts
    17

    Re: Displaying live information

    Bump
    Last edited by Faaal; October 21st, 2011 at 04:25 AM.

  5. #5
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Displaying live information

    You may want to look at the WNet functions.
    http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx

  6. #6
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Displaying live information

    Maybe you can use PowerShell http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx instead
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  7. #7
    Join Date
    Aug 2011
    Posts
    17

    Re: Displaying live information

    Can anyone help me with the development of this? I understand it's a big ask but I keep finding myself scratching my head - fingers have pointed towards here and there but I'm in a world of unknown.

  8. #8
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: Displaying live information

    Take a look at GetAdaptersInfo() for the network information.

    For the mount info, take a look at DeviceIoControl() with the
    IOCTL_MOUNTMGR_QUERY_POINTS parameter.

    -Erik


  9. #9
    Join Date
    Aug 2011
    Posts
    17

    Re: Displaying live information

    Quote Originally Posted by egawtry View Post
    Take a look at GetAdaptersInfo() for the network information.

    For the mount info, take a look at DeviceIoControl() with the
    IOCTL_MOUNTMGR_QUERY_POINTS parameter.

    -Erik

    Thanks Erik. That was exactly what I was looking for, ill research those functions.

Tags for this Thread

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