Application Auto-Start by Register

Windows Application Auto Start by Setting Register Value

The below C function is used to automatically start up the application in windows by setting up the register value. Specify the path of your application registry value and store the keyname and key value will make up the things to auto start of your application

C Function to Auto Start Application


//nfilename: the path to the application
//keyname: the name to appear in the registry
void AutoStartRegs(char *nfilename, char *keyname)
{
HKEY key;

RegCreateKeyEx(HKEY_CURRENT_USER, "SoftwareMicrosoftWindowsCurrentVersionRun", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, NULL);
RegSetValueEx(key, keyname, 0, REG_SZ, (const unsigned char *)nfilename, strlen(nfilename));
RegCloseKey(key);

return;
}


Related Topic List of Server Ports and their Assigned Numbers
Android: Java Class for Bluetooth OBEX Server Session Data Transfer
Android's Bluetooth Inbound and Outbound Transfer
Developer Code for JS Timer
Android Application Development SDK Dalvik Virtual Machine

nScraps.com 2011   Privacy Policy  Terms of Service  Feedback