#include <windows.h> #include <stdio.h> #include <conio.h> main() { HKEY hKey;char szProductType[32]; DWORD dwBufLen=32; RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",0,KEY_EXECUTE,&hKey); if(RegQueryValueEx(hKey,"test",NULL,NULL,szProductType,&dwBufLen) != ERROR_SUCCESS) { printf("no k \n"); getch(); } }