cd ../$RANDOM

Getting the System Version [UNSTABLE]

1 minute read

Windows API Sets mechanism is introduced by Microsoft from Windows 7. Also, PEB structure has new field ApiSetMap:


ApiSetMap is a pointer to another structure _API_SET_NAMESPACE:


According to lucasg’s post Version value is different on Windows 7, Windows 8.1 and Windows 10, which means we can use this field to get Windows system version:



NOTE: It’s not recommended to use this method in a production product, there is a much stable way from MSDN using Version API Helper functions;