// 64bitOS対応
#include "advapi32.as"
#define HKEY_LOCAL_MACHINE 0x80000002
#define KEY_QUERY_VALUE 0x00000001
#define KEY_WOW64_64KEY 0x00000100
key = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"
nBufSize = 512
sdim ProductName, nBufSize
RegOpenKeyEx HKEY_LOCAL_MACHINE, key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, varptr(hkey)
RegQueryValueEx hKey, "ProductName", 0, 0, varptr(ProductName), varptr(nBufSize)
RegCloseKey hKey
mes ProductName