none
Windows Network Map in Application

    Question

  • This might be a stupid question but, is it possible to add the Windows Network Map (Control Panel > Network and Internet > Network and Sharing Center > "See full map") to my WinForms app?

    I'm writing a IT utility and having the network map in the app itself, versus going thru control panel would really help when my app explains certain issues.


    Owner, Quilnet Solutions
    Wednesday, December 28, 2011 7:27 AM

Answers

  • Hi Quilnux,

    Welcome to MSDN Forum.

    The Network Map feature is used to reflect quickly that if any computers are connected to a domain. In the “Network Map” window, you can see all the connections.

    As far as I know, we cannot add network map to an application, a folder, but to a device.

     

    If you want to start “Control Panel -> Network and Sharing Center” programically from your Winform application, you can run this command line “control.exe /name Microsoft.NetworkAndSharingCenter“ like this:

    Process proc = Process.Start("control.exe", "/name Microsoft.NetworkAndSharingCenter");

     

    By the way, the "See full map" feature is disabled by default. We can enable it under Administrator account by editing Group Policy.

    Type “gpedit.msc” in command prompt to start Group Policy Editor -> Navigate through the console tree to Local Computer Policy | Computer Configuration | Administrative Templates | Network | Link Layer Topology Discovery -> Turn on Mapper I/O (LLTDIO) Driver setting

     

    If you have any difficulty in future programming, you are welcome to post here again.


    Martin Xie [MSFT]
    MSDN Community Support | Feedback to us

    Friday, December 30, 2011 3:54 AM
    Moderator

All replies

  • Hi Quilnux,

    Welcome to MSDN Forum.

    The Network Map feature is used to reflect quickly that if any computers are connected to a domain. In the “Network Map” window, you can see all the connections.

    As far as I know, we cannot add network map to an application, a folder, but to a device.

     

    If you want to start “Control Panel -> Network and Sharing Center” programically from your Winform application, you can run this command line “control.exe /name Microsoft.NetworkAndSharingCenter“ like this:

    Process proc = Process.Start("control.exe", "/name Microsoft.NetworkAndSharingCenter");

     

    By the way, the "See full map" feature is disabled by default. We can enable it under Administrator account by editing Group Policy.

    Type “gpedit.msc” in command prompt to start Group Policy Editor -> Navigate through the console tree to Local Computer Policy | Computer Configuration | Administrative Templates | Network | Link Layer Topology Discovery -> Turn on Mapper I/O (LLTDIO) Driver setting

     

    If you have any difficulty in future programming, you are welcome to post here again.


    Martin Xie [MSFT]
    MSDN Community Support | Feedback to us

    Friday, December 30, 2011 3:54 AM
    Moderator
  • Sad face.

    Alright, thanks for the respond. Have an awesome new year!


    Owner, Quilnet Solutions
    Friday, December 30, 2011 4:00 AM
  • Additionally, I’d like to share another related scenario here. Maybe you feel interested in it.

    If we want to map a network share folder (UNC path) to a driver, please check these ways:

    1. Run such command line

    Process proc = Process.Start("net.exe", @"use K: \\server\sharefolder");

     

    2. Use this wrapper class for interfacing with windows map network drive API's. 

    http://www.codeproject.com/KB/system/mapnetdrive.aspx


     


    Martin Xie [MSFT]
    MSDN Community Support | Feedback to us

    Friday, December 30, 2011 4:04 AM
    Moderator
  • Thats not really related to what we are doing. We really just wanted to display the network map within our application for a visual reference.

    Thanks,


    Owner, Quilnet Solutions
    Friday, December 30, 2011 4:14 AM
  • Thanks Quilnux for your greeting.

    To display the network map within your application for a visual reference, you can handle Button Click event where you run this command line "control.exe /name Microsoft.NetworkAndSharingCenter“ to open Network And SharingCenter window.

    Process proc = Process.Start("control.exe", "/name Microsoft.NetworkAndSharingCenter");


    Martin Xie [MSFT]
    MSDN Community Support | Feedback to us
    Friday, December 30, 2011 5:31 AM
    Moderator
  • It's disappointing there is not a more integrated way of doing this but we will find a way to make it work.

    Thanks again for your help!


    Owner, Quilnet Solutions
    Friday, December 30, 2011 9:31 PM