Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Win32 Api Problem, Win32 API Problem
saga
post 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. smile.gif

tnx in advance guys..

Go to the top of the page
 
+Quote Post
switch
post 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 smile.gif

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.
Go to the top of the page
 
+Quote Post
kvkv
post 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.
Go to the top of the page
 
+Quote Post
Spectre
post 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.
Go to the top of the page
 
+Quote Post
saga
post 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...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. 60 Seconds Countdown That Shutdown The Pc(13)
  2. A Possible Problem With Ftp And Filezilla(4)
  3. I Have A Girl Problem Here(25)
  4. Win32: Dialog Box And Accelerator(1)
  5. Dvd Drive Problem(10)
  6. Skype / Xampp Port Conflict(4)
  7. Problem With My External Hard Disk(7)
  8. Two Lan Ports Problem(3)
  9. Rpg Maker 2003 Music Problem(3)
  10. I'm Having A Strange Problem With My Ping In Cs:s(28)
  11. I Have A Big Problem With Cs 1.6.(4)
  12. Cannot Connect To Mail Server(3)
  13. Weird Write Problem(3)
  14. Harddrive "open With..." Problem(1)
  15. [chsupport #ecn-115724]: Ftp/cpanel Login Problem(7)
  1. Need Help: Problem Seeing My Site(4)
  2. Postage Costs Problem For My Website(7)
  3. Hosting Problem(moderators) [resolved](3)
  4. Problem Connecting To Phpmyadmin(2)
  5. Forum Problem? Topic Disappeared Immediately [resolved](2)
  6. Hosting Problem [resolved](22)
  7. Problem Aligning In Firefox(8)
  8. It Went Well For A While(5)
  9. Itunes Problem!(1)
  10. How Many More Times Will I Have To Post About This?(11)
  11. Problem Getting Text To Align With Different Resolutions(4)
  12. Youtube People That Do Not Respect Other Opinions(7)
  13. A Problem With Ftp Clients(9)


 



- Lo-Fi Version Time is now: 21st August 2008 - 01:16 PM