Option Explicit 'On Error Resume Next ' ログファイル Dim objFSO,objTxt,objShell Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set objFSO = WScript.CreateObject("Scripting.FileSystemObject") Set objTxt = objFSO.OpenTextFile("GetDetailsOf1.txt", ForWriting, true, -1) Set objShell = WScript.CreateObject("WScript.Shell") ' とりあえずなファイルを指定 Dim strFilePath strFilePath = "C:\Windows\System32\ntoskrnl.exe" 'strFilePath = "C:\Windows\regedit.exe" 'strFilePath = "C:\Program Files\Mozilla Firefox\firefox.exe" 'strFilePath = "D:\Documents\kozue_bg.bmp" 'strFilePath = "C:\Users\aidamomo\Pictures\flash_player_update.jpg" Dim objFile Set objFile = objFSO.GetFile(strFilePath) Dim strFileName, strFolder ' ファイル名を取得 strFileName = objFSO.GetFileName(strFilePath) ' フォルダ名を取得 strFolder = objFile.ParentFolder Dim objShellApp Set objShellApp = CreateObject ("Shell.Application") Dim objFolder, objFolderItems, objItem Set objFolder = objShellApp.Namespace(strFolder) Set objFolderItems = objFolder.Items ' プロパティ情報を objItem に格納 Set objItem = objFolderItems.Item(strFileName) ' 400 まで回してみるw Dim y, strName For y=0 To 400 strName = objFolder.GetDetailsOf(Nothing, y) Call Name_List 'Call Check_File Next Set objItem = Nothing Set objFolderItems = Nothing Set objFolder = Nothing Set objFile = Nothing Set objShellApp = Nothing objTxt.WriteBlankLines (1) objTxt.Close objShell.Run "GetDetailsOf1.txt" Set objTxt = Nothing Set objFSO = Nothing Set objShell = Nothing '********************************************************* ' Sub Name_List '********************************************************* ' プロパティの項目名取得 Sub Name_List If strName <> "" Then objTxt.WriteLine y & vbTab & " : " & strName End If End Sub '********************************************************* ' Sub Check_File '********************************************************* ' 指定ファイルのプロパティの項目名とデータ取得 Sub Check_File Dim strValue strValue = objFolder.GetDetailsOf(objItem, y) If strValue <> "" Then objTxt.WriteLine y & ") " & strName & vbTab & " : " & strValue End If End Sub