<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; WSH: Получение информации о свойствах исполняемого файла]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=5600</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5600&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «WSH: Получение информации о свойствах исполняемого файла».]]></description>
		<lastBuildDate>Fri, 18 Mar 2011 23:23:42 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: WSH: Получение информации о свойствах исполняемого файла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46374#p46374</link>
			<description><![CDATA[<p>Вот спасибо, это самое оно! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Аскет)]]></author>
			<pubDate>Fri, 18 Mar 2011 23:23:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46374#p46374</guid>
		</item>
		<item>
			<title><![CDATA[Re: WSH: Получение информации о свойствах исполняемого файла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46373#p46373</link>
			<description><![CDATA[<p>В довесок, могу предложить вот такую функцию<br /></p><div class="codebox"><pre><code>Option Explicit

Dim i, Attribute, AttributeList

For i=0 To 100
    AttributeList = AttributeList &amp; i &amp; &quot;)&quot; &amp; GetFileAttribute(&quot;C:\1.doc&quot;,i) &amp; VbCrLf
Next

MsgBox AttributeList

Function GetFileAttribute(FileName,Attribute)
    Dim ShellApplication, Path, Name, Folder, FolderItem
    Set ShellApplication = CreateObject(&quot;Shell.Application&quot;)
    Path = Left(FileName, InStrRev(FileName, &quot;\&quot;) - 1)
    Name = Mid(FileName,InStrRev(FileName, &quot;\&quot;) + 1)
    Set Folder = ShellApplication.NameSpace(Path)
    Set FolderItem = Folder.ParseName(Name)
    GetFileAttribute = Folder.GetDetailsOf(FolderItem,Attribute)
End Function</code></pre></div><p>Либо класс модуль.&nbsp; Конечно кода чуть больше. Но работать будет шустрее. Т.к нет необходимости каждый раз грузить объекты и &quot;подключение&quot; к файлу происходит 1 раз.<br /></p><div class="codebox"><pre><code>Option Explicit

Dim i, OleDocumentProperties, AttributeList, AttributeValue

Set OleDocumentProperties = New clsOleDocumentProperties

OleDocumentProperties.OpenFile &quot;C:\1.doc&quot;

For i = 0 To 100
    AttributeValue = OleDocumentProperties.GetAttributeValue(i)
    If AttributeValue &lt;&gt; &quot;&quot; Then AttributeList = AttributeList &amp; i &amp; &quot;)&quot; &amp; OleDocumentProperties.GetAttributeName(i) &amp; &quot;: &quot; &amp; AttributeValue &amp; VbCrLf
Next

MsgBox AttributeList

Class clsOleDocumentProperties
    Private ShellApplication, Folder, FolderItem, Parsed
    Sub Class_Initialize
        Set ShellApplication = CreateObject(&quot;Shell.Application&quot;)
    End Sub
    
    Sub OpenFile(FileName)
        On Error Resume Next
        Parsed = False
        Dim Path, Name
        Path = Left(FileName, InStrRev(FileName, &quot;\&quot;) - 1)
        Name = Mid(FileName,InStrRev(FileName, &quot;\&quot;) + 1)
        Set Folder = ShellApplication.NameSpace(Path)
        Set FolderItem = Folder.ParseName(Name)
        if Err.number &lt;&gt; 0 or FolderItem is Nothing Then 
            On Error Goto 0
            Err.Raise vbObjectError + 1,&quot;OpenFile&quot;,&quot;Не удалось открыть файл &quot;&quot;&quot; &amp; FileName &amp; &quot;&quot;&quot;&quot;
        End if
        Parsed = True
    End Sub

    Function GetAttributeValue(index)
        if Parsed Then GetAttributeValue = Folder.GetDetailsOf(FolderItem,index)
    End Function

    Function GetAttributeName(index)
        if Parsed Then GetAttributeName = Folder.GetDetailsOf(,index)
    End Function
End Class</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Xameleon)]]></author>
			<pubDate>Fri, 18 Mar 2011 21:14:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46373#p46373</guid>
		</item>
		<item>
			<title><![CDATA[Re: WSH: Получение информации о свойствах исполняемого файла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46372#p46372</link>
			<description><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?id=38">Серый форум / VBScript: чтение расширенных свойств файлов</a></p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Fri, 18 Mar 2011 21:12:27 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46372#p46372</guid>
		</item>
		<item>
			<title><![CDATA[Re: WSH: Получение информации о свойствах исполняемого файла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46371#p46371</link>
			<description><![CDATA[<p>Думаю Вам поможет метод <strong>GetDetailsOf</strong><br />По этой ссылке можно найти информацию о нём<br /><a href="http://www.google.ru/#hl=ru&amp;xhr=t&amp;q=GetDetailsOf&amp;cp=9&amp;pf=p&amp;sclient=psy&amp;newwindow=1&amp;site=&amp;source=hp&amp;aq=0&amp;aqi=&amp;aql=&amp;oq=GetDetail&amp;pbx=1&amp;fp=8e88961366b4d746">http://www.google.ru/#hl=ru&amp;xhr=t&a … 1366b4d746</a></p><p>А здесь уже готовые примеры <br /><a href="http://msdn.microsoft.com/en-us/library/bb787870(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library … s.85).aspx</a></p>]]></description>
			<author><![CDATA[null@example.com (Xameleon)]]></author>
			<pubDate>Fri, 18 Mar 2011 20:58:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46371#p46371</guid>
		</item>
		<item>
			<title><![CDATA[WSH: Получение информации о свойствах исполняемого файла]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=46370#p46370</link>
			<description><![CDATA[<p>Каким образом (не прибегая к сторонним инструментам) можно извлечь информацию из исполняемого файла DLL/OCX/EXE?<br />&nbsp; &nbsp;(Свойства файла -&gt; Вкладка «Версия»)</p><p>В частности интересует графа &quot;Описание&quot;.</p>]]></description>
			<author><![CDATA[null@example.com (Аскет)]]></author>
			<pubDate>Fri, 18 Mar 2011 20:40:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=46370#p46370</guid>
		</item>
	</channel>
</rss>
