<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBScript: слежение за изменением ключа реестра]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=755</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=755&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBScript: слежение за изменением ключа реестра».]]></description>
		<lastBuildDate>Sat, 06 Oct 2007 12:21:15 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[VBScript: слежение за изменением ключа реестра]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=5364#p5364</link>
			<description><![CDATA[<p>Автор идеи - <strong>Alexbootch</strong>.<br />Скрипт отслеживает изменение значения указанного ключа в реестре:<br /></p><div class="codebox"><pre><code>strComputer = &quot;.&quot; 
strHive = &quot;HKEY_LOCAL_MACHINE&quot;
strKeyPath = &quot;SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\&quot;
strValueName = &quot;Userinit&quot;
&#039;====================================================================
Set objWMIService = GetObject(&quot;winmgmts:\\&quot; &amp; strComputer &amp; &quot;\root\DEFAULT&quot;) 
Set objEvents = objWMIService.ExecNotificationQuery _
(&quot;SELECT * FROM RegistryValueChangeEvent WHERE &quot; &amp; _
    &quot;Hive = &#039;&quot; &amp; strHive &amp; &quot;&#039;&quot; &amp; _
    &quot; AND KeyPath = &#039;&quot; &amp; strKeyPath &amp; &quot;&#039;&quot; &amp; _
    &quot; AND ValueName = &#039;&quot; &amp; strValueName &amp; &quot;&#039;&quot;)

Do While(True)
    Set objReceivedEvent = objEvents.NextEvent
    Wscript.Echo Now &amp; &quot; изменён ключ: &quot; &amp; strHive &amp; &quot;\&quot; &amp; Replace(strKeyPath, &quot;\\&quot;, &quot;\&quot;) &amp; strValueName
Loop</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Sat, 06 Oct 2007 12:21:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=5364#p5364</guid>
		</item>
	</channel>
</rss>
