saga 0 Report post Posted February 9, 2006 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.. Share this post Link to post Share on other sites
switch 0 Report post Posted February 9, 2006 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 :huh: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. Share this post Link to post Share on other sites
kvkv 0 Report post Posted February 10, 2006 Add your entries toHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunLook into the existing entries in this key for example. Share this post Link to post Share on other sites
Spectre 0 Report post Posted February 10, 2006 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. Share this post Link to post Share on other sites
saga 0 Report post Posted February 14, 2006 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... Share this post Link to post Share on other sites