<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBScript: определение текущего IP-адреса]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=692</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=692&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBScript: определение текущего IP-адреса».]]></description>
		<lastBuildDate>Tue, 25 Dec 2007 19:25:26 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBScript: определение текущего IP-адреса]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=7357#p7357</link>
			<description><![CDATA[<p>Получение IP-адреса для определённого сетевого подключения:<br /></p><div class="codebox"><pre><code>strComputer  =  &quot;.&quot;
&#039; отредактировать под нужное имя сетевого подключения:
strNetworkConnection = &quot;&#039;Подключение по локальной сети&#039;&quot;

Set objWMIService = GetObject(&quot;winmgmts:\\&quot; &amp; strComputer &amp; &quot;\root\cimv2&quot;)
Set colNics = objWMIService.ExecQuery(&quot;Select * From Win32_NetworkAdapter &quot; _
    &amp; &quot;Where NetConnectionID = &quot; &amp; strNetworkConnection)
For Each objNic in colNics
    Set colNicConfigs = objWMIService.ExecQuery(&quot;ASSOCIATORS OF &quot; _
        &amp; &quot;{Win32_NetworkAdapter.DeviceID=&#039;&quot; &amp; objNic.DeviceID &amp; &quot;&#039;}&quot; _
        &amp; &quot; WHERE AssocClass=Win32_NetworkAdapterSetting&quot;)
    For Each objNicConfig In colNicConfigs
        For Each strIPAddress in objNicConfig.IPAddress
            Wscript.Echo &quot;IP Address: &quot; &amp; strIPAddress
        Next
    Next
Next</code></pre></div><p>Пример опубликовал <strong>cmepx</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Tue, 25 Dec 2007 19:25:26 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=7357#p7357</guid>
		</item>
		<item>
			<title><![CDATA[VBScript: определение текущего IP-адреса]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=4845#p4845</link>
			<description><![CDATA[<p>Определение текущих IP-адресов существующих сетевых подключений данного компьютера.<br /></p><div class="codebox"><pre><code>strComputer = &quot;.&quot;
Set objWMIService = GetObject(&quot;winmgmts:&quot; _
    &amp; &quot;{impersonationLevel=impersonate}!\\&quot; &amp; strComputer &amp; &quot;\root\cimv2&quot;)

Set IPConfigSet = objWMIService.ExecQuery _
    (&quot;Select * from Win32_NetworkAdapterConfiguration Where IPEnabled=TRUE&quot;)
 
For Each IPConfig in IPConfigSet
    If Not IsNull(IPConfig.IPAddress) Then 
        For Each IPAddress In IPConfig.IPAddress
            WScript.Echo IPAddress
        Next
    End If
Next</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Mon, 17 Sep 2007 16:56:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=4845#p4845</guid>
		</item>
	</channel>
</rss>
