<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBScript: утилита LogParser от Microsoft, COM-интерфейс]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=934</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=934&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBScript: утилита LogParser от Microsoft, COM-интерфейс».]]></description>
		<lastBuildDate>Tue, 01 Jan 2013 13:31:47 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBScript: утилита LogParser от Microsoft, COM-интерфейс]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=68106#p68106</link>
			<description><![CDATA[<div class="quotebox"><cite>griha09 пишет:</cite><blockquote><p>The gray Cardinal, у вас в первом посте пример поиска *.dll на диске C:\. А как сделать с помощью LogParser поиск нескольких расширений на нескольких дисках?</p></blockquote></div><p>В комплекте поставки идёт подробный файл справки. Рекомендуется читать его.<br /></p><div class="codebox"><pre><code>… FROM C:\*.dll, D:\*.dll, C:\*.exe, D:\*.exe</code></pre></div><p>Либо искать всё «*.*», отбирать потребное условиями в «WHERE».</p><div class="quotebox"><cite>griha09 пишет:</cite><blockquote><p>скрипт выдал ошибку</p></blockquote></div><p><span style="color: Green">Нажмите Ctrl-C, затем вставляйте сюда текст. Проще, быстрее и правильнее.</span></p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Tue, 01 Jan 2013 13:31:47 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=68106#p68106</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBScript: утилита LogParser от Microsoft, COM-интерфейс]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=68093#p68093</link>
			<description><![CDATA[<p><strong>The gray Cardinal</strong>, у вас в первом посте пример поиска *.dll на диске C:\. А как сделать с помощью LogParser поиск нескольких расширений на нескольких дисках?</p><p>Кстати, у меня ваш скрипт выдал ошибку</p>]]></description>
			<author><![CDATA[null@example.com (griha09)]]></author>
			<pubDate>Tue, 01 Jan 2013 02:59:13 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=68093#p68093</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBScript: утилита LogParser от Microsoft, COM-интерфейс]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=6865#p6865</link>
			<description><![CDATA[<p>По теме ссылка - http://blogs.technet.com/mscom/archive/2006/10/25/yes-we-recycle-that-includes-apppools.aspx</p>]]></description>
			<author><![CDATA[null@example.com (wictor)]]></author>
			<pubDate>Sun, 09 Dec 2007 16:03:15 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=6865#p6865</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBScript: утилита LogParser от Microsoft, COM-интерфейс]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=6853#p6853</link>
			<description><![CDATA[<p><strong>П</strong>ример <strong>logon.cmd</strong><br />получаем фаил <strong>Report.xml</strong><br />так как sql не вынесен за пакетный файл запрос пишем <strong>одной строкой</strong> .<br /></p><div class="codebox"><pre><code>LogParser &quot;SELECT TimeGenerated AS LogonDate, EXTRACT_TOKEN(Strings, 0, &#039;|&#039;) AS Account INTO Report.xml FROM Security WHERE EventID NOT IN (541;542;543) AND EventType = 8 AND EventCategory = 2&quot;</code></pre></div><p>Исходный собран с помощью <strong>visual</strong>[ log parser:<br /></p><div class="codebox"><pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;us-ascii&quot; standalone=&quot;yes&quot;?&gt;
&lt;query&gt;
  &lt;inputName&gt;EVT&lt;/inputName&gt;
  &lt;text&gt;LogParser &quot;SELECT TimeGenerated AS LogonDate, EXTRACT_TOKEN(Strings, 0, &#039;|&#039;) AS Account INTO Report.xml FROM Security WHERE EventID NOT IN (541;542;543) AND EventType = 8 AND EventCategory = 2&quot;
&lt;/text&gt;
  &lt;inputFormat&gt;
    &lt;fullText&gt;True&lt;/fullText&gt;
    &lt;resolveSIDs&gt;False&lt;/resolveSIDs&gt;
    &lt;formatMessage&gt;True&lt;/formatMessage&gt;
    &lt;formatMsg&gt;True&lt;/formatMsg&gt;
    &lt;msgErrorMode&gt;MSG&lt;/msgErrorMode&gt;
    &lt;fullEventCode&gt;False&lt;/fullEventCode&gt;
    &lt;direction&gt;FW&lt;/direction&gt;
    &lt;stringsSep&gt;|&lt;/stringsSep&gt;
    &lt;iCheckpoint /&gt;
    &lt;binaryFormat&gt;HEX&lt;/binaryFormat&gt;
  &lt;/inputFormat&gt;
&lt;/query&gt;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (wictor)]]></author>
			<pubDate>Sat, 08 Dec 2007 18:58:01 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=6853#p6853</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBScript: утилита LogParser от Microsoft, COM-интерфейс]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=6847#p6847</link>
			<description><![CDATA[<p><strong>wictor</strong><br />Не торопись <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" />.<br />Во-первых, пример работы с LogParser из командной строки для обращения к файловой системе уже есть в Коллекции: <a href="http://forum.script-coding.com/viewtopic.php?id=926">CMD/BAT: отчёт по свойствам файлов по маске с помощью Log Parser</a>.<br />Во-вторых, здесь речь именно о <strong>COM-интерфейсе</strong> LogParser&#039;а, а не об интерфейсе командной строки.<br /></p><div class="quotebox"><cite>wictor пишет:</cite><blockquote><p>Состояние открыт -кем открыт -на чтение -на запись .<br />И возможно ли отключить пользователя - например от базы данных .</p></blockquote></div><p>Как раз эти проблемы LogParser&#039;ом НЕ решаются. Свойства LastAccessTime, LastWriteTime и т.д. тут, имхо, не при чём.</p>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Sat, 08 Dec 2007 15:34:56 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=6847#p6847</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBScript: утилита LogParser от Microsoft, COM-интерфейс]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=6836#p6836</link>
			<description><![CDATA[<p>Обычно в практике нужно узнать не сколько файлов в каталоге по маске.<br />Состояние открыт -кем открыт -на чтение -на запись .<br />И возможно ли отключить пользователя - например от базы данных .<br />CreationTime&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />LastAccessTime&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />LastWriteTime</p><p>Интерсная ссылка : </p><div class="codebox"><pre><code>http://www.iis.net/default.aspx?tabid=2&amp;subtabid=29#LogParser</code></pre></div><p>files.bat c:\windows\*.exe&nbsp; <strong>(Пример)</strong><br /></p><div class="codebox"><pre><code>@Echo off
If &quot;%1&quot;==&quot;&quot; goto end 
Echo on
LogParser -i:FS -o:NAT -q:on &quot;SELECT  CreationTime, Size, Name, Attributes, Path  FROM %1  ORDER BY Size&quot;  
goto stop
@Echo off
:end
echo нет строковой переменной
:stop</code></pre></div><p>logparser должен быть установлен !<br />работа программы 3-4 секунды<br />Соврал - короче время засеч не ;)успел</p><p><strong><br />Возможности Выборки :</strong><br /></p><div class="codebox"><pre><code>Path                                          STRING Full path of the file or directory 
Name                                        STRING Name of the file or directory 
Size                                          INTEGER Size of the file, in bytes 
Attributes                                  STRING Attributes of the file or directory 
CreationTime                            TIMESTAMP Date and time at which the file or directory has been created (local or UTC time, depending on the value of the useLocalTime parameter) 
LastAccessTime                         TIMESTAMP Date and time at which the file or directory has been last accessed (local or UTC time, depending on the value of the useLocalTime parameter) 
LastWriteTime                           TIMESTAMP Date and time at which the file or directory has been last modified (local or UTC time, depending on the value of the useLocalTime parameter) 
FileVersion                                STRING Version of the file 
ProductVersion                          STRING Version of the product the file is distributed with 
InternalName                            STRING Internal name of the file 
ProductName                            STRING Name of the product the file is distributed with 
CompanyName                         STRING Name of the vendor company that produced the file 
LegalCopyright                          STRING Copyright notices that apply to the file 
LegalTrademarks                       STRING Trademarks and registered trademarks that apply to the file 
PrivateBuild                               STRING Private version information of the file 
SpecialBuild                              STRING Special file build notes 
Comments                                STRING Comments associated with the file 
FileDescription                           STRING Description of the file 
OriginalFilename                        STRING Original name of the file</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (wictor)]]></author>
			<pubDate>Sat, 08 Dec 2007 13:41:31 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=6836#p6836</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBScript: утилита LogParser от Microsoft, COM-интерфейс]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=6834#p6834</link>
			<description><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>Кэш?</p></blockquote></div><p>Не знаю <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />.</p>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Sat, 08 Dec 2007 13:30:57 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=6834#p6834</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBScript: утилита LogParser от Microsoft, COM-интерфейс]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=6833#p6833</link>
			<description><![CDATA[<p>Кэш?</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Sat, 08 Dec 2007 13:30:08 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=6833#p6833</guid>
		</item>
		<item>
			<title><![CDATA[VBScript: утилита LogParser от Microsoft, COM-интерфейс]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=6830#p6830</link>
			<description><![CDATA[<p>Утилита <a href="http://www.microsoft.com/technet/scriptcenter/tools/logparser/default.mspx">LogParser</a>, как оказалось, обладает развитым COM-интерфейсом и заслуживает тщательного изучения, имхо <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />. Вот, например, поиск всех dll-файлов на диске C:<br /></p><div class="codebox"><pre><code>Set oLogQuery = CreateObject(&quot;MSUtil.LogQuery&quot;)
Set oFormat = CreateObject(&quot;MSUtil.LogQuery.FileSystemInputFormat&quot;)
Set oRecordSet = oLogQuery.Execute(&quot;SELECT * FROM C:\*.dll&quot;, oFormat)
&#039; WScript.Echo oRecordSet.getColumnCount()
i = 0
While Not oRecordSet.atEnd
    Set oRecord = oRecordSet.getRecord()
    strValue = oRecord.getValue(&quot;Path&quot;)
    WScript.Echo strValue
    i = i + 1
    oRecordSet.moveNext
Wend
oRecordSet.Close
WScript.Echo &quot;На диске &quot;&quot;C:&quot;&quot; найдено dll-файлов: &quot; &amp; i</code></pre></div><p>Интересно, что первый раз такой скрипт у меня выполнялся ~230 сек., второй и последующие разы ~21сек.</p>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Sat, 08 Dec 2007 12:59:36 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=6830#p6830</guid>
		</item>
	</channel>
</rss>
