Directory Identifiers MSDM Product Key Reader
DIRID.INF
and
LDID.INF
create the file
DIRID.INI
or
LDID.INI
respectively on the user’s desktop with all known
Dirids
and the pathnames they resolve to, then opens it in
Windows’® text editor
NotePad.exe
.
DIRID.INF
or
LDID.INF
respectively to display its context menu and click Installto run it.
MSDM Product Key Reader.exe
displays the device-specific individual product keyembedded by (big) OEMs in the MSDM table of the ACPI BIOS.
product keyis used for automatic selection of the product edition and the activation of Windows 8 and Windows 8.1 during their installation, and can since version
1511alias
Threshold 2be used for (manual) product activation of Windows 10 too.
white paperavailable from Microsoft Software Licensing Tables (SLIC and MSDM) on MSDN.
MSDM Product Key Reader.exe
is a pure
Win32 application, written in
ANSI C,
built with the MSDM Product Key Reader.exe
from the source.
Note:
MSDM Product Key Reader.exe
is a pure
Win32 application and builds without the
MSVCRT
libraries.
Create the text file GIMMICK.C
with the following
content:
// Copyright © 2012-2021, Stefan Kanthak <stefan.kanthak@nexgo.de>
#define STRICT
#undef UNICODE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
typedef struct _msdm // 'Microsoft Data Management' table
{
DWORD Signature; // "MSDM" = 0x4D44534D = 'MDSM'
DWORD Length; // size of entire MSDM table: 0x00000055
BYTE Revision;
BYTE Checksum; // checksum of entire MSDM table
CHAR OEMId[6]; // OEM identification
CHAR OEMTableId[8];
DWORD OEMRevision;
CHAR CreatorId[4]; // creator identification
DWORD CreatorRevision;
DWORD Version; // 0x00000001
DWORD Reserved; // 0x00000000
DWORD DataType; // 0x00000001
DWORD DataReserved; // 0x00000000
DWORD DataLength; // 0x0000001D
CHAR Data[29]; // product key: "23467-89BCD-FGHJK-MNPQR-TVWXY"
} MSDM;
__declspec(noreturn)
__declspec(safebuffers)
VOID WINAPI WinMainCRTStartup(VOID)
{
MSDM msdm;
BYTE bCheckSum;
DWORD dwCheckSum;
// see <https://msdn.microsoft.com/en-us/library/ms724379.aspx>
if (GetSystemFirmwareTable('ACPI', 'MDSM', NULL, sizeof(msdm)) == 0)
MessageBoxExA(HWND_DESKTOP,
"No \'MSDM\' table found!",
"\'MSDM\' Product Key Reader",
MB_OK | MB_ICONQUESTION,
MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL));
else
if (GetSystemFirmwareTable('ACPI', 'MDSM', &msdm, sizeof(msdm)) > sizeof(msdm))
MessageBoxExA(HWND_DESKTOP,
"Error reading \'MSDM\' table!",
"\'MSDM\' Product Key Reader",
MB_OK | MB_ICONERROR,
MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL));
else
{
for (bCheckSum = 0, dwCheckSum = msdm.Length;
dwCheckSum > 0L;
bCheckSum += ((BYTE *) &msdm)[--dwCheckSum])
continue;
if ((bCheckSum != 0)
|| (msdm.Version != 1L)
|| (msdm.Reserved != 0L)
|| (msdm.DataType != 1L)
|| (msdm.DataReserved != 0L)
|| (msdm.DataLength != sizeof(msdm.Data)))
MessageBoxExA(HWND_DESKTOP,
"Invalid or unknown \'MSDM\' table found!",
"\'MSDM\' Product Key Reader",
MB_OK | MB_ICONWARNING,
MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL));
else
{
msdm.Data[sizeof(msdm.Data)] = '\0';
MessageBoxExA(HWND_DESKTOP,
msdm.Data,
"\'MSDM\' Product Key Reader",
MB_OK | MB_ICONINFORMATION,
MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL));
}
}
ExitProcess(GetLastError());
}
Run the following three command lines to compile the source file
GIMMICK.C
created in step 1., link the compiled
object file GIMMICK.OBJ
and cleanup afterwards:
CL.EXE /c /GA /GF /GS /O1 /Os /TcGIMMICK.C /W4 /Zl LINK.EXE /LINK /DYNAMICBASE /ENTRY:WinMainCRTStartup /FIXED:NO /NODEFAULTLIB /NXCOMPAT /OSVERSION:5.2 /OUT:"MSDM Product Key Reader.exe" /RELEASE /SUBSYSTEM:WINDOWS,5.2 /SWAPRUN:CD,NET GIMMICK.OBJ KERNEL32.LIB USER32.LIB ERASE GIMMICK.OBJFor details and reference see the MSDN articles Compiler Options and Linker Options.
Note: if necessary, see the
MSDN article
Use the Microsoft C++ toolset from the command line
for an introduction.
Note: the command lines can be copied and pasted as block into a Command Processor window!
Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. GIMMICK.C Microsoft (R) Incremental Linker Version 10.00.40219.386 Copyright (C) Microsoft Corporation. All rights reserved.
CONTEXT.REG
to display its context menu and click Mergeto import it into the registry of your user account.
REGEDIT4
; Copyright © 2004-2021, Stefan Kanthak <stefan.kanthak@nexgo.de>
[HKEY_CURRENT_USER\Software\Classes\*\Shell\Cmdline]
@="ProgId '*'"
[HKEY_CURRENT_USER\Software\Classes\*\Shell\Cmdline\Command]
@="C:\\Windows\\System32\\Cmd.exe /V:ON /K Echo Command Line: && Echo !CMDCMDLINE! && Echo. && Echo Arguments: && Echo *=%* && Echo 0=%0 && Echo 1=%1 && Echo 2=%2 && Echo D=%D && Echo H=%H && Echo I=%I && Echo L=%L && Echo S=%S && Echo V=%V && Echo W=%W"
[HKEY_CURRENT_USER\Software\Classes\.\Shell\Cmdline]
@="ProgId '.'"
[HKEY_CURRENT_USER\Software\Classes\.\Shell\Cmdline\Command]
@="C:\\Windows\\System32\\Cmd.exe /V:ON /K Echo Command Line: && Echo !CMDCMDLINE! && Echo. && Echo Arguments: && Echo *=%* && Echo 0=%0 && Echo 1=%1 && Echo 2=%2 && Echo D=%D && Echo H=%H && Echo I=%I && Echo L=%L && Echo S=%S && Echo V=%V && Echo W=%W"
[HKEY_CURRENT_USER\Software\Classes\DesktopBackground\Shell\Cmdline]
@="ProgId 'DesktopBackground'"
[HKEY_CURRENT_USER\Software\Classes\DesktopBackground\Shell\Cmdline\Command]
@="C:\\Windows\\System32\\Cmd.exe /V:ON /K Echo Command Line: && Echo !CMDCMDLINE! && Echo. && Echo Arguments: && Echo *=%* && Echo 0=%0 && Echo 1=%1 && Echo 2=%2 && Echo D=%D && Echo H=%H && Echo I=%I && Echo L=%L && Echo S=%S && Echo V=%V && Echo W=%W"
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\Shell\Cmdline]
@="ProgId 'Directory\Background'"
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\Shell\Cmdline\Command]
@="C:\\Windows\\System32\\Cmd.exe /V:ON /K Echo Command Line: && Echo !CMDCMDLINE! && Echo. && Echo Arguments: && Echo *=%* && Echo 0=%0 && Echo 1=%1 && Echo 2=%2 && Echo D=%D && Echo H=%H && Echo I=%I && Echo L=%L && Echo S=%S && Echo V=%V && Echo W=%W"
[HKEY_CURRENT_USER\Software\Classes\Directory\Shell\Cmdline]
@="ProgId 'Directory'"
[HKEY_CURRENT_USER\Software\Classes\Directory\Shell\Cmdline\Command]
@="C:\\Windows\\System32\\Cmd.exe /V:ON /K Echo Command Line: && Echo !CMDCMDLINE! && Echo. && Echo Arguments: && Echo *=%* && Echo 0=%0 && Echo 1=%1 && Echo 2=%2 && Echo D=%D && Echo H=%H && Echo I=%I && Echo L=%L && Echo S=%S && Echo V=%V && Echo W=%W"
[HKEY_CURRENT_USER\Software\Classes\Drive\Shell\Cmdline]
@="ProgId 'Drive'"
[HKEY_CURRENT_USER\Software\Classes\Drive\Shell\Cmdline\Command]
@="C:\\Windows\\System32\\Cmd.exe /V:ON /K Echo Command Line: && Echo !CMDCMDLINE! && Echo. && Echo Arguments: && Echo *=%* && Echo 0=%0 && Echo 1=%1 && Echo 2=%2 && Echo D=%D && Echo H=%H && Echo I=%I && Echo L=%L && Echo S=%S && Echo V=%V && Echo W=%W"
[HKEY_CURRENT_USER\Software\Classes\Folder\Shell\Cmdline]
@="ProgId 'Folder'"
[HKEY_CURRENT_USER\Software\Classes\Folder\Shell\Cmdline\Command]
@="C:\\Windows\\System32\\Cmd.exe /V:ON /K Echo Command Line: && Echo !CMDCMDLINE! && Echo. && Echo Arguments: && Echo *=%* && Echo 0=%0 && Echo 1=%1 && Echo 2=%2 && Echo D=%D && Echo H=%H && Echo I=%I && Echo L=%L && Echo S=%S && Echo V=%V && Echo W=%W"
[HKEY_CURRENT_USER\Software\Classes\NetServer\Shell\Cmdline]
@="ProgId 'NetServer'"
[HKEY_CURRENT_USER\Software\Classes\NetServer\Shell\Cmdline\Command]
@="C:\\Windows\\System32\\Cmd.exe /V:ON /K Echo Command Line: && Echo !CMDCMDLINE! && Echo. && Echo Arguments: && Echo *=%* && Echo 0=%0 && Echo 1=%1 && Echo 2=%2 && Echo D=%D && Echo H=%H && Echo I=%I && Echo L=%L && Echo S=%S && Echo V=%V && Echo W=%W"
; NOTE: key not evaluated!
[-HKEY_CURRENT_USER\Software\Classes\SystemFileAssociations\*\Shell\Cmdline]
[HKEY_CURRENT_USER\Software\Classes\SystemFileAssociations\.\Shell\Cmdline]
@="ProgId 'SystemFileAssociations\\.'"
[HKEY_CURRENT_USER\Software\Classes\SystemFileAssociations\.\Shell\Cmdline\Command]
@="C:\\Windows\\System32\\Cmd.exe /V:ON /K Echo Command Line: && Echo !CMDCMDLINE! && Echo. && Echo Arguments: && Echo *=%* && Echo 0=%0 && Echo 1=%1 && Echo 2=%2 && Echo D=%D && Echo H=%H && Echo I=%I && Echo L=%L && Echo S=%S && Echo V=%V && Echo W=%W"
[HKEY_CURRENT_USER\Software\Classes\Unknown\Shell\Cmdline]
@="ProgId 'Unknown'"
[HKEY_CURRENT_USER\Software\Classes\Unknown\Shell\Cmdline\Command]
@="C:\\Windows\\System32\\Cmd.exe /V:ON /K Echo Command Line: && Echo !CMDCMDLINE! && Echo. && Echo Arguments: && Echo *=%* && Echo 0=%0 && Echo 1=%1 && Echo 2=%2 && Echo D=%D && Echo H=%H && Echo I=%I && Echo L=%L && Echo S=%S && Echo V=%V && Echo W=%W"
Use the X.509 certificate to send S/MIME encrypted mail.
Note: email in weird format and without a proper sender name is likely to be discarded!
I dislike
HTML (and even
weirder formats too) in email, I prefer to receive plain text.
I also expect to see your full (real) name as sender, not your
nickname.
I abhor top posts and expect inline quotes in replies.
as iswithout any warranty, neither express nor implied.
cookiesin the web browser.
The web service is operated and provided by
Telekom Deutschland GmbH The web service provider stores a session cookie
in the web
browser and records every visit of this web site with the following
data in an access log on their server(s):