automatic-destinations-file

Windows Automatic Destinations(自動配置先)ファイルから LNK(ショートカット)エントリを解析して、最近使用したファイルの記録を取得します。Automatic Destinations ファイルは、Windows 7 以降でジャンプリストの自動エントリを OLE 複合ファイル形式で保存しており、%APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations ディレクトリに存在します。

コマンドプロパティ

項目説明
コマンドタイプドライバークエリ
必要な権限なし
ライセンス使用量集計あり
並列実行非対応
分散実行非対応

構文

automatic-destinations-file [zippath=STR] [zipcharset=STR] [codepage=STR] FILE_PATH

オプション

zippath=STR
ZIP ファイルのパス。分析対象ファイルが ZIP アーカイブ内にある場合、ZIP ファイルのパスを指定します。
zipcharset=STR
ZIP エントリ名の文字セット(デフォルト: utf-8)。
codepage=STR
Windows デフォルトコードページ。LNK ファイル内部の ANSI 文字列をデコードする際に使用します(デフォルト: euc-kr)。

対象

FILE_PATH
Automatic Destinations ファイルのパス。ワイルドカード(*)を使用して複数のファイルを一度に取得できます。zippathオプションと併用する場合は ZIP ファイル内部のパスを指定します。

出力フィールド

フィールドタイプ説明
_filestring元の Automatic Destinations ファイル名
app_idstringアプリケーション名。ファイル名の App ID に基づいて参照した値
file_ctimetimestamp元のファイルの作成日時
file_mtimetimestamp元のファイルの更新日時
file_atimetimestamp元のファイルのアクセス日時
target_file_sizelong対象ファイルサイズ(バイト)
target_file_attrsarray対象ファイル属性のリスト。READONLYHIDDENSYSTEMDIRECTORYARCHIVEDEVICENORMALTEMPORARYSPARSE_FILEREPARSE_POINTCOMPRESSEDOFFLINENOT_CONTENT_INDEXEDENCRYPTEDVIRTUAL のうち該当する値
target_file_ctimetimestamp対象ファイルの作成日時
target_file_mtimetimestamp対象ファイルの更新日時
target_file_atimetimestamp対象ファイルのアクセス日時
drive_seriallongボリュームシリアル番号
drive_typestringドライブタイプ。DRIVE_UNKNOWNDRIVE_NO_ROOT_DIRDRIVE_REMOVABLEDRIVE_FIXEDDRIVE_REMOTEDRIVE_CDROMDRIVE_RAMDISK のいずれか
volume_labelstringボリュームラベル
local_pathstring対象ファイルのローカルパス(ANSI)
local_path_unicodestring対象ファイルのローカルパス(Unicode)
net_namestringネットワーク共有名
common_path_suffixstring共通パスサフィックス
show_windowstringウィンドウ表示方式。SHOW_NORMALSHOW_MAXIMIZEDSHOW_MINIMIZED など
shortcut_namestringショートカット名
working_dirstring作業ディレクトリのパス
relative_pathstring相対パス
cmd_argsstringコマンドライン引数
icon_locationstringアイコンの場所
hot_keystringショートカットキーの組み合わせ

エラーコード

パースエラー

該当なし

ランタイムエラー
エラーコードメッセージ説明後処理動作
-cannot read automatic destinations file [FILE_PATH]ファイルの読み取りまたは解析中にエラーが発生した場合クエリを中断

説明

automatic-destinations-fileコマンドは、Windows の Automatic Destinations ファイルを OLE 複合ファイルとして解析し、内部に含まれる LNK(ショートカット)エントリを取得します。1つの Automatic Destinations ファイルには複数の LNK エントリが含まれる場合があり、各エントリが1レコードとして出力されます。

ファイル名から App ID を抽出し、内蔵の App ID マッピングテーブルと照合します。マッピングに成功するとapp_idフィールドにアプリケーション名を割り当てます。

使用例

  1. 単一の Automatic Destinations ファイルを取得

    automatic-destinations-file C:\Users\user\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations\f01b4d95cf55d32a.automaticDestinations-ms
    

    指定した Automatic Destinations ファイルから LNK エントリを取得します。

  2. ワイルドカードで複数のファイルを取得

    automatic-destinations-file C:\Users\user\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations\*.automaticDestinations-ms
    

    AutomaticDestinationsディレクトリ内のすべての Automatic Destinations ファイルを取得します。

  3. ZIP アーカイブ内のファイルを取得

    automatic-destinations-file zippath=D:\evidence\artifacts.zip AutomaticDestinations\*.automaticDestinations-ms
    

    ZIP アーカイブ内の Automatic Destinations ファイルを取得します。

  4. コードページを指定して取得

    automatic-destinations-file codepage=utf-8 C:\Users\user\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations\*.automaticDestinations-ms
    

    コードページをutf-8に指定して ANSI 文字列をデコードします。

  5. 特定アプリケーションの最近使用したファイルを取得

    automatic-destinations-file C:\Users\user\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations\*.automaticDestinations-ms
    | search app_id == "Microsoft Word"
    

    アプリケーション名がMicrosoft Wordのエントリのみフィルタリングします。