Skip to content

Instantly share code, notes, and snippets.

@hirosof
Created October 4, 2025 04:33
Show Gist options
  • Select an option

  • Save hirosof/6cf64bbd3287fe99b0c7466f33f78fbe to your computer and use it in GitHub Desktop.

Select an option

Save hirosof/6cf64bbd3287fe99b0c7466f33f78fbe to your computer and use it in GitHub Desktop.

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2022\Visual Studio Tools\Developer Command Prompt for VS 2022.lnk

ShellLinkHeader (Offset : 0x00000000)

HeaderSize : 0x0000004c
LinkCLSID : {00021401-0000-0000-C000-000000000046}
LinkFlags : 703 (0x000002bf)
	HasLinkTargetIDList (0x00000001) 
	HasLinkInfo (0x00000002) 
	HasName (0x00000004) 
	HasRelativePath (0x00000008) 
	HasWorkingDir (0x00000010) 
	HasArguments (0x00000020) 
	IsUnicode (0x00000080) 
	HasExpString (0x00000200) 

FileAttributes : 32 (0x00000020)
	FILE_ATTRIBUTE_ARCHIVE (0x00000020) 

CreationTime : 2024/05/15 11:06:30 (UTC) = 2024/05/15 20:06:30 (Local)
AccessTime : 2025/05/14 14:42:40 (UTC) = 2025/05/14 23:42:40 (Local)
WriteTime : 2024/05/15 11:06:30 (UTC) = 2024/05/15 20:06:30 (Local)
FileSize : 289792

IconIndex : 0
ShowCommand : SW_SHOWNORMAL (0x00000001)
HotKey : None (0x0000)

LinkTargetIDList (Offset : 0x0000004c)

IDList Parsed Result (by SHGetNameFromIDList) : 
	SIGDN_NORMALDISPLAY : 
		cmd.exe

	SIGDN_PARENTRELATIVEPARSING : 
		cmd.exe

	SIGDN_DESKTOPABSOLUTEPARSING : 
		C:\Windows\System32\cmd.exe

	SIGDN_PARENTRELATIVEEDITING : 
		cmd.exe

	SIGDN_DESKTOPABSOLUTEEDITING : 
		C:\Windows\System32\cmd.exe

	SIGDN_FILESYSPATH : 
		C:\Windows\System32\cmd.exe

	SIGDN_URL : 
		file:///C:/Windows/System32/cmd.exe

	SIGDN_PARENTRELATIVEFORADDRESSBAR : 
		cmd.exe

	SIGDN_PARENTRELATIVE : 
		cmd.exe

	SIGDN_PARENTRELATIVEFORUI : 
		cmd.exe

IDList Binary Hex Dump (309 bytes): 
	14 00 1F 50 E0 4F D0 20 EA 3A 69 10 A2 D8 08 00 2B 30 30 9D 19 00 2F 43 3A 5C 00 00 00 00 00 00 
	00 00 00 00 00 00 00 00 00 00 00 00 00 56 00 31 00 00 00 00 00 A2 5A 85 0B 10 00 57 69 6E 64 6F 
	77 73 00 40 00 09 00 04 00 EF BE 87 4F 77 48 AE 5A 34 74 2E 00 00 00 90 F7 11 00 00 00 1B 00 00 
	00 00 00 00 00 00 00 00 00 00 00 00 00 A0 EF B6 00 57 00 69 00 6E 00 64 00 6F 00 77 00 73 00 00 
	00 16 00 5A 00 31 00 00 00 00 00 AE 5A D0 74 10 00 53 79 73 74 65 6D 33 32 00 00 42 00 09 00 04 
	00 EF BE 87 4F 77 48 AE 5A D0 74 2E 00 00 00 EF 1D 12 00 00 00 06 00 00 00 00 00 00 00 00 00 00 
	00 00 00 00 00 44 C6 38 00 53 00 79 00 73 00 74 00 65 00 6D 00 33 00 32 00 00 00 18 00 56 00 32 
	00 00 6C 04 00 AF 58 D0 58 20 00 63 6D 64 2E 65 78 65 00 40 00 09 00 04 00 EF BE AF 58 D0 58 AE 
	5A 03 73 2E 00 00 00 99 8E 37 00 00 00 04 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 CC 9E EB 
	00 63 00 6D 00 64 00 2E 00 65 00 78 00 65 00 00 00 16 00 00 00 

IDList Binary Dump Array(309 bytes): 
	const size_t NumberOfIDListDataElements = 309;
	const uint8_t IDListData[NumberOfIDListDataElements] = {
		0x14, 0x00, 0x1F, 0x50, 0xE0, 0x4F, 0xD0, 0x20, 0xEA, 0x3A, 0x69, 0x10, 0xA2, 0xD8, 0x08, 0x00, 
		0x2B, 0x30, 0x30, 0x9D, 0x19, 0x00, 0x2F, 0x43, 0x3A, 0x5C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x00, 0x31, 
		0x00, 0x00, 0x00, 0x00, 0x00, 0xA2, 0x5A, 0x85, 0x0B, 0x10, 0x00, 0x57, 0x69, 0x6E, 0x64, 0x6F, 
		0x77, 0x73, 0x00, 0x40, 0x00, 0x09, 0x00, 0x04, 0x00, 0xEF, 0xBE, 0x87, 0x4F, 0x77, 0x48, 0xAE, 
		0x5A, 0x34, 0x74, 0x2E, 0x00, 0x00, 0x00, 0x90, 0xF7, 0x11, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 
		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0xEF, 0xB6, 
		0x00, 0x57, 0x00, 0x69, 0x00, 0x6E, 0x00, 0x64, 0x00, 0x6F, 0x00, 0x77, 0x00, 0x73, 0x00, 0x00, 
		0x00, 0x16, 0x00, 0x5A, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAE, 0x5A, 0xD0, 0x74, 0x10, 
		0x00, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x33, 0x32, 0x00, 0x00, 0x42, 0x00, 0x09, 0x00, 0x04, 
		0x00, 0xEF, 0xBE, 0x87, 0x4F, 0x77, 0x48, 0xAE, 0x5A, 0xD0, 0x74, 0x2E, 0x00, 0x00, 0x00, 0xEF, 
		0x1D, 0x12, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
		0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xC6, 0x38, 0x00, 0x53, 0x00, 0x79, 0x00, 0x73, 0x00, 0x74, 
		0x00, 0x65, 0x00, 0x6D, 0x00, 0x33, 0x00, 0x32, 0x00, 0x00, 0x00, 0x18, 0x00, 0x56, 0x00, 0x32, 
		0x00, 0x00, 0x6C, 0x04, 0x00, 0xAF, 0x58, 0xD0, 0x58, 0x20, 0x00, 0x63, 0x6D, 0x64, 0x2E, 0x65, 
		0x78, 0x65, 0x00, 0x40, 0x00, 0x09, 0x00, 0x04, 0x00, 0xEF, 0xBE, 0xAF, 0x58, 0xD0, 0x58, 0xAE, 
		0x5A, 0x03, 0x73, 0x2E, 0x00, 0x00, 0x00, 0x99, 0x8E, 0x37, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 
		0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCC, 0x9E, 0xEB, 
		0x00, 0x63, 0x00, 0x6D, 0x00, 0x64, 0x00, 0x2E, 0x00, 0x65, 0x00, 0x78, 0x00, 0x65, 0x00, 0x00, 
		0x00, 0x16, 0x00, 0x00, 0x00
	};

LinkInfo (Offset : 0x00000183)

LinkInfoSize : 76 (0x0000004c)
LinkInfoHeaderSize : 28 (0x0000001c)
LinkInfoFlags : 1 (0x00000001)
	VolumeIDAndLocalBasePath

LocalBasePath : 
	C:\Windows\System32\cmd.exe

CommonPathSuffix : 
	

VolumeID (Offset : 0x0000019f)

VolumeIDSize : 19 (0x00000013)
DriveType : DRIVE_FIXED (0x00000003)
DriveSerialNumber : E4DEFDE7
VolumeLabel : OS

StringData

NAME_STRING (Offset : 0x000001cf)

  • CountCharacters : 44 (0x002c)

  • String

     Open Visual Studio 2022 Tools Command Prompt
    

RELATIVE_PATH (Offset : 0x00000229)

  • CountCharacters : 45 (0x002d)

  • String

     ..\..\..\..\..\..\..\Windows\System32\cmd.exe
    

WORKING_DIR (Offset : 0x00000285)

  • CountCharacters : 56 (0x0038)

  • String

     C:\Program Files\Microsoft Visual Studio\2022\Community\
    

COMMAND_LINE_ARGUMENTS (Offset : 0x000002f7)

  • CountCharacters : 87 (0x0057)

  • String

     /k "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat"
    

ExtraData

  • DataBlock一覧

     DataBlock#0 (Offset : 0x000003a7) :
     	BlockSize : 788 (0x00000314)
     	BlockSignature : 0xa0000001 (EnvironmentVariableDataBlock)
    
     DataBlock#1 (Offset : 0x000006bb) :
     	BlockSize : 16 (0x00000010)
     	BlockSignature : 0xa0000005 (SpecialFolderDataBlock)
    
     DataBlock#2 (Offset : 0x000006cb) :
     	BlockSize : 28 (0x0000001c)
     	BlockSignature : 0xa000000b (KnownFolderDataBlock)
    
     DataBlock#3 (Offset : 0x000006e7) :
     	BlockSize : 96 (0x00000060)
     	BlockSignature : 0xa0000003 (TrackerDataBlock)
    
     DataBlock#4 (Offset : 0x00000747) :
     	BlockSize : 206 (0x000000ce)
     	BlockSignature : 0xa0000009 (PropertyStoreDataBlock)
    
    

EnvironmentVariableDataBlock (Offset : 0x000003a7)

BlockSize : 788 (0x00000314)
BlockSignature : 0xa0000001

TargetAnsi : 
	%comspec%

TargetUnicode : 
	%comspec%

KnownFolderDataBlock (Offset : 0x000006cb)

BlockSize : 28 (0x0000001c)
BlockSignature : 0xa000000b

KnownFolderID : {1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}
Offset : 221 (0x000000dd)
  • Appendix
    • KnownFolderID (MacroName) : FOLDERID_System

PropertyStoreDataBlock (Offset : 0x00000747)

BlockSize : 206 (0x000000ce)
BlockSignature : 0xa0000009

DataSize : 198 (0x000000c6)

storage offset : 0x0000074f
	storage size : 137
	storage type : 0
	storage guid : {46588AE2-4CBC-4338-BBFC-139326986DCE}
storage offset : 0x000007d8
	storage size : 57
	storage type : 0
	storage guid : {446D16B1-8DAD-4870-A748-402EA43D788C}
hr : 0x00000000

  • ※ データ部分は未パース

SpecialFolderDataBlock (Offset : 0x000006bb)

BlockSize : 16 (0x00000010)
BlockSignature : 0xa0000005

SpecialFolderID : 37 (0x00000025)
Offset : 221 (0x000000dd)

TrackerDataBlock (Offset : 0x000006e7)

BlockSize : 96 (0x00000060)
BlockSignature : 0xa0000003
Length : 88 (0x00000058)

MachineID : hirosof-pc2006

Droid : 
	{73AAD2BC-20DF-4E16-8F79-1C61C415450C}
	{1D3AD908-1826-11EF-884F-5041B9504A6D}

DroidBirth : 
	{73AAD2BC-20DF-4E16-8F79-1C61C415450C}
	{1D3AD908-1826-11EF-884F-5041B9504A6D}
@hirosof
Copy link
Author

hirosof commented Oct 4, 2025

参考 (LnkParse3 でのパース結果)

{
    "data": {
        "command_line_arguments": "/k \"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Common7\\Tools\\VsDevCmd.bat\"",
        "description": "Open Visual Studio 2022 Tools Command Prompt",
        "relative_path": "..\\..\\..\\..\\..\\..\\..\\Windows\\System32\\cmd.exe",
        "working_directory": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\"
    },
    "extra": {
        "DISTRIBUTED_LINK_TRACKER_BLOCK": {
            "birth_droid_file_identifier": "1D3AD908-1826-11EF-884F-5041B9504A6D",
            "birth_droid_volume_identifier": "73AAD2BC-20DF-4E16-8F79-1C61C415450C",
            "droid_file_identifier": "1D3AD908-1826-11EF-884F-5041B9504A6D",
            "droid_volume_identifier": "73AAD2BC-20DF-4E16-8F79-1C61C415450C",
            "length": 88,
            "machine_identifier": "hirosof-pc2006",
            "size": 96,
            "version": 0
        },
        "ENVIRONMENTAL_VARIABLES_LOCATION_BLOCK": {
            "size": 788,
            "target_ansi": "%comspec%",
            "target_unicode": "%comspec%"
        },
        "KNOWN_FOLDER_LOCATION_BLOCK": {
            "known_folder_id": "1AC14E77-02E7-4E5D-B744-2EB1AE5198B7",
            "offset": 221,
            "size": 28
        },
        "METADATA_PROPERTIES_BLOCK": {
            "property_store": [
                {
                    "format_id": "46588AE2-4CBC-4338-BBFC-139326986DCE",
                    "serialized_property_values": [
                        {
                            "id": 4,
                            "value": "S-1-5-21-2227464249-2145598250-73073719-1001",
                            "value_size": 109,
                            "value_type": "VT_LPWSTR"
                        }
                    ],
                    "storage_size": 137,
                    "version": "0x53505331"
                },
                {
                    "format_id": "446D16B1-8DAD-4870-A748-402EA43D788C",
                    "serialized_property_values": [
                        {
                            "id": 104,
                            "value": null,
                            "value_size": 29,
                            "value_type": "VT_CLSID"
                        }
                    ],
                    "storage_size": 57,
                    "version": "0x53505331"
                }
            ],
            "size": 206
        },
        "SPECIAL_FOLDER_LOCATION_BLOCK": {
            "offset": 221,
            "size": 16,
            "special_folder_id": 37
        }
    },
    "header": {
        "accessed_time": "2025-05-14T14:42:40+00:00",
        "creation_time": "2024-05-15T11:06:30+00:00",
        "file_flags": [
            "FILE_ATTRIBUTE_ARCHIVE"
        ],
        "file_size": 289792,
        "guid": "00021401-0000-0000-C000-000000000046",
        "hotkey": "UNSET - UNSET {0x0000}",
        "icon_index": 0,
        "link_flags": [
            "HasTargetIDList",
            "HasLinkInfo",
            "HasName",
            "HasRelativePath",
            "HasWorkingDir",
            "HasArguments",
            "IsUnicode",
            "HasExpString"
        ],
        "modified_time": "2024-05-15T11:06:30+00:00",
        "r_file_flags": 32,
        "r_hotkey": 0,
        "r_link_flags": 703,
        "windowstyle": "SW_SHOWNORMAL"
    },
    "link_info": {
        "common_path_suffix": "",
        "link_info_flags": 1,
        "local_base_path": "C:\\Windows\\System32\\cmd.exe",
        "location": "Local",
        "location_info": {
            "drive_serial_number": "0xe4defde7",
            "drive_type": "DRIVE_FIXED",
            "r_drive_type": 3,
            "volume_label": "OS"
        }
    },
    "target": {
        "items": [
            {
                "class": "Root Folder",
                "guid": "20D04FE0-3AEA-1069-A2D8-08002B30309D",
                "sort_index": "My Computer"
            },
            {
                "class": "Volume Item",
                "data": null,
                "flags": "0xf"
            },
            {
                "class": "File entry",
                "file_attribute_flags": 16,
                "file_size": 0,
                "flags": "Is directory",
                "primary_name": "Windows"
            },
            {
                "class": "File entry",
                "file_attribute_flags": 16,
                "file_size": 0,
                "flags": "Is directory",
                "primary_name": "System32"
            },
            {
                "class": "File entry",
                "file_attribute_flags": 32,
                "file_size": 289792,
                "flags": "Is file",
                "primary_name": "cmd.exe"
            }
        ]
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment