Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows-7:Disable internet connection sharing on network adapter when it's in hidden state?
    primarykey
    data
    text
    <p>I'm trying to share internet over a network adapter on windows-7 using <code>NetConLib.dll</code>.</p> <p>In order to do this, internet sharing should be <em>disabled</em> on all other network adapters.</p> <p>In <em>normal</em> cases. I can iterate all the installed network adapters and disable sharing on them. <em>However</em>, sometimes when the network device is <em>unplugged</em>, the adapter is <strong><em>hidden</em></strong> in windows. But it's properties is still present inside windows registry.</p> <p>I can't even find the adapter in Control Panel. And off course, can't iterate it using the <code>NetConlib</code> library.</p> <p><br/></p> <h1>Possible scenarios.</h1> <ul> <li><p>The easiest way, would be using a windows command to disable internet sharing on all the adapters. Regardless of their visibility.</p> <p><em>Is that possible in anyway ?</em></p></li> <li><p>The second solution is to recover the network adapter from hidden state, so that <code>NetConlib</code> could iterate through it and disable it.</p> <p><em>I tried to find the adapter's properties in windows registry and <code>unhide</code> it, But couldn't find anything</em>.</p></li> </ul> <p><strong>Any solution?</strong></p> <hr> <h1>@erm3nda.</h1> <p>Thank you for the informative answer. Although it didn't fix the problem I'm facing with <code>NetConlib</code>.</p> <p>SC config correctly shuts down ICS service. But the shared network adapter continues on being <em>flagged</em> as <code>Shared</code><sup><strong>1</strong></sup>. So ICS service being turned <em>off</em> doesn't seem to affect the adapters' settings.</p> <p>Quite interestingly; when you try to share another adapter using windows GUI (<code>Right click on adapter -&gt; Properties -&gt; Share</code>), a message is prompted telling you </p> <blockquote> <p>"there is another adapter being shared currently, your new adapter will be shared instead". You click ok and it's done.</p> </blockquote> <p>I've been digging the entire internet the whole afternoon to see if there are other solutions using CMD commands.</p> <p>Maybe there could be a away to share an adapter with a command. This way windows would handle disabling other adapters. In a similar way as when the GUI is used.</p> <hr> <p><sup><strong>1: Windows tells you which adapter is currently being shared in <code>Control Panel\Network and Internet\Network Connections</code>).</strong></sup></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload