Jump to content
xisto Community
Sign in to follow this  
saga

Win32 Api Problem Win32 API Problem

Recommended Posts

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. :rolleyes: tnx in advance guys..

Share this post


Link to post
Share on other sites

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.