Windows Startup
-
Hi! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!:). I think i must use the registry but i m not sure! Thanks! ------------------------------ If you can't find the -- -- -- -- -- -- -- -- -- -- way..let the way find you.. ------------------------------
-
Hi! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!:). I think i must use the registry but i m not sure! Thanks! ------------------------------ If you can't find the -- -- -- -- -- -- -- -- -- -- way..let the way find you.. ------------------------------
extus wrote:
Hi! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!. I think i must use the registry but i m not sure! Thanks!
Try this :
CRegKey key;
LONG status = key.Open(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\Run");if(status==ERROR_SUCCESS)
{
key.SetValue("Path of your program","Name of your program");
}key.Close();
do not forget to include
atlbase.h
in your application
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
-- modified at 7:26 Saturday 15th October, 2005 -
Hi! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!:). I think i must use the registry but i m not sure! Thanks! ------------------------------ If you can't find the -- -- -- -- -- -- -- -- -- -- way..let the way find you.. ------------------------------
sure ,you must set Registry let your application start up after windows starts up and use API function. ---------------------------- Jerry yu Chinese programming fans
-
Hi! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!:). I think i must use the registry but i m not sure! Thanks! ------------------------------ If you can't find the -- -- -- -- -- -- -- -- -- -- way..let the way find you.. ------------------------------
extus wrote:
i! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!. I think i must use the registry but i m not sure! Thanks!
extus wrote:
i! Does anyone know how can i make my application starts when windows starts up, i mean using code not put the application in the startup folder!. I think i must use the registry but i m not sure! Thanks!
In continuation With Giorgi:- there are two more place from where you can start your application at window startup:- #1 already told bu Giorgi #2 HKEY_CURRENT_USER code:- (just One change to Giorgi code)
CRegKey key;
LONG status = key.Open(HKEY_CURRENT_USER,"Software\\Microsoft\\Windows\\CurrentVersion\\Run");if(status==ERROR_SUCCESS)
{
key.SetValue("Path of your program","Name of your program");
}key.Close();
#3 Make entry in %windir%\startup
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV