OpenPastebin

[ normal view ]

Syntax: php

   #2236 Posted by petrzel_rulz 2007-07-05 18:24:40 ( view diff)
Formated by GeSHi
  1. void registry(string winroot, string name)
  2. {
  3. HKEY hKey;
  4. char cname[300];
  5. strcpy(cname,name.c_str());
  6. string value = "" + winroot + "\\system32\\" + name + ".exe";
  7. char cvalue[500];
  8. strcpy(cvalue,value.c_str());
  9.  
  10.  
  11. RegCreateKey(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run",&hKey);
  12. RegSetValueEx(hKey,cname,0,REG_SZ,(const BYTE*)cvalue,sizeof(cvalue));
  13. RegCloseKey(hKey);
  14. }
Parsed in 0.31058884 seconds
Email this post Email  ::  Print Print   
:: Download   Download Text File2236.txt   Download Gziped text File2236.txt.gz   Download HTML File2236.html   Download PDF File2236.pdf
:: Print into    Print into HTML FileHTML document   Print into PDF FilePDF document