Cedric Le Jalle
June 9th, 1999, 02:26 AM
Hi..
Here's a new question for you programmers..
I'm writing an application which should start up with Windows, but without having a 'myapp.lnk' in the start up menu..So, to do this, I thought I should use the registry, but the problem is that I never used registry before...So, imagine I have the full path of my app in
CString myPath = "c:\mypath\myapp.exe";
..then, how can I add it into registry so that the app start up automatically with Windows..I think that I should write it into
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run
in the registry, is this right ?..
If so, how can I write myPath into it if it doesn't already exists ?..hey, also I would like to know how I can remove it ?
Could you send me some sample code..?
Thanks a lot.. :)
-Cedric-
Here's a new question for you programmers..
I'm writing an application which should start up with Windows, but without having a 'myapp.lnk' in the start up menu..So, to do this, I thought I should use the registry, but the problem is that I never used registry before...So, imagine I have the full path of my app in
CString myPath = "c:\mypath\myapp.exe";
..then, how can I add it into registry so that the app start up automatically with Windows..I think that I should write it into
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run
in the registry, is this right ?..
If so, how can I write myPath into it if it doesn't already exists ?..hey, also I would like to know how I can remove it ?
Could you send me some sample code..?
Thanks a lot.. :)
-Cedric-