Click Here
Home Blog Gallery Links Tutorials Projects
[C++] Adding a program to Startup 2011-06-16 16:10
A nice c++ example how to add a program to startup is here. All you nead to add this to your code. it utilizes windows api btw. The example is below.
Quote:
HKEY hkey;
char szBuf[] = "C:\\Windows\\notepad.exe";
RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\Currentversion\\Run", 0, KEY_SET_VALUE, &hkey);
RegSetValueEx (hkey, "notepad.exe", 0, REG_SZ, (LPBYTE) szBuf, strlen(szBuf) + 1);
RegCloseKey(hkey);
full code below.
http://pastebin.com/LSHzGJE6

Add a Comment

Get Your IP Instantly
Name:
Enter the text from the image below to the text field next to it (text is case sensitive):
Captcha
Email:

Name:
Password:

Enter Captcha (Case Sensitive):
Captcha


Register
English
Lietuviškai

RSS Feed
Main Content
Animation
Carmageddon
Programming
Technology
Electronics
Gaming
Linux
Anything
Site News

Unique visit count:
1 visits on page.
742 visits on site.
Detailed Statistics
Misceleanous Content