Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<windows.h>
- #include<stdio.h>
- main()
- {
- HKEY i;
- char info[200];
- DWORD l;
- RegCreateKey(HKEY_CURRENT_USER,"Software\\shifat2",&i);
- RegSetValueExA(i,"hello",0,REG_SZ,"hello shifat",12);
- RegCloseKey(i);
- RegOpenKeyA(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",&i);
- RegQueryValueExA(i,"welcome",0,NULL,(LPBYTE)info,&l);
- RegCloseKey(i);
- printf("%s",info);
- _getch();
- return 0;
- }
- /*
- values of hkey
- HKEY_CLASSES_ROOT 0x80000000
- HKEY_CURRENT_USER 0x80000001
- HKEY_LOCAL_MACHINE 0x80000002
- HKEY_USERS 0x80000003
- HKEY_CURRENT_CONFIG 0x80000005
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement