|
|
|
|
![]() ![]() |
Feb 9 2006, 07:01 AM
Post
#1
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 165 Joined: 12-September 05 Member No.: 11,777 |
the problem is that i want to be able to make my program automatically load to memory or execute as soon as windows start up.
the only solution i know is to put a link in the startup folder for all user or an specific user.... is there any other possible way using Win32 API function calls that do the trick.. like some part in the windows registry were you add the path and file name of programs you want to execute at start up? i need only pure Win32 API function calls since im not using visual basic but a bloodshed win32 compiler. MFC gives me headache. tnx in advance guys.. |
|
|
|
Feb 9 2006, 10:37 PM
Post
#2
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 178 Joined: 13-October 04 From: NSW, Australia Member No.: 1,713 |
well, i'm not sure if there is a specific Windows API call that handles adding straight to the Startup list, but there are definately commands that add to the registry, and there is definately a startup list in the registry. You can tell because I've got a whole chunk of stuff that loads on startup but isn't in the startup shortcuts folder
just learn how to use the Win32 registry commands and find out the specific registry entry the startup list is under. There are plenty of tutorials around on the net. Good luck mate. |
|
|
|
Feb 10 2006, 03:59 AM
Post
#3
|
|
|
Newbie [Level 3] ![]() ![]() ![]() Group: Members Posts: 40 Joined: 29-January 06 Member No.: 17,841 |
Add your entries to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run Look into the existing entries in this key for example. |
|
|
|
Feb 10 2006, 04:36 AM
Post
#4
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 874 Joined: 30-July 04 Member No.: 246 |
Adding a string value to HKLM\Software\Microsoft\Windows\CurrentVersion\Run, HKLM\...\RunServices, HKCU\...\Run or HKCU\...\RunServices pointing to the executable file will result in the program automatically launching at startup (depending on the operating system, it can be before or after the shell).
There isn't a single API call you can use to access the Windows registry - there are a number of them you will need to use (RegOpenKey/RegOpenKeyA, RegCloseKeyA, RegSetValueExA... and so on). Although not overly difficult, it's too complex to mention here - I would suggest either looking for an example of source code, or searching MSDN. |
|
|
|
Feb 14 2006, 08:25 AM
Post
#5
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 165 Joined: 12-September 05 Member No.: 11,777 |
tanks for the info... i think its enough for me to start to work with the situation... i have installed and msdn october release in my unit so i guess its updated enough to help me work with registry...
thnks... |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 21st August 2008 - 01:16 PM |