   Starting a program when the computer starts
  How can I make one of my programs start when the computer starts?//EDIT: Gave the thread a title. - jba.[Edited by - jbadams on August 22, 2008 9:11:45 AM]
  you have to add an entry in the registry for that, see below:win xp:http://support.microsoft.com/kb/314866/EN-US/other windows:http://support.microsoft.com/kb/137367/en-us/to get the specific functions, you'll need to post your programming language :-D   ;  Or put a shortcut in the startup folder of the start menu, which is cleaner IMO (Easier to remove, doesn't need registry hacking).   ;  IN C++ LANGUAGE   ;  Add an entry to the registry, or add a shortcut to the start menu. There's a way to programatically create a shortcut, but I don't know of any links offhand. The registry method is easier to do, but should really be done in an installer so the registry entry can be removed later on.Something like this should work (untested):LPCSTR szPath = "C:/foo/bar/app.exe"; // Path to your exe to runRegSetValue(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Run\\MyAppName", REG_SZ, szPath, strlen(szPath));;Quote:Original post by DEALOSIN C++ LANGUAGEFirst of all, loose the caps.Secondly, you can't code into a C++ program the ability to start at startup.You need to tell your operating system to start it at startup.If you are using windows, the easiest way is to just make a shortcut to your built .exe file, and place the shortcut in the "startup" folder.When Windows starts, it automatically runs everything you have in that folder.Now then, if you want the program to install itself as to start at startup, then you need to make that part of the installation procedure.   ;  Package your application up into a .msi installer, it'll sort out things like desktop shortcuts, start menu entries and if I'm not mistaken it provides the ability to add it to the Startup menu.There's plenty of packaging tools, I'd recommend the Nullsoft installer.;  It would probably be helpful to know what operating system you are using first. The techniques are quite different say between Mac OS X and Windows. In fact I think they are different across Windows versions as well. So, yeah, if you want a decent answer we need some more info.   ;Quote:Original post by deadstarPackage your application up into a .msi installer, it'll sort out things like desktop shortcuts, start menu entries and if I'm not mistaken it provides the ability to add it to the Startup menu.There's plenty of packaging tools, I'd recommend the Nullsoft installer.To add to deadstar's reply, you could also try using a lesser-known tool that's included with Windows called IExpress (Start->Run->IExpress). It allows you to make a self-extracting executable that will run an installation script that you specify as part of the unpacking process. I've used it at work to install a script on some co-workers' computers to block a stupid time-out window from popping up on one of the web apps we use. The installation script is just a batch file that copies the script file to the start-up folder in the start menu.   ;Quote:Original post by brent_wIf you are using windows, the easiest way is to just make a shortcut to your built .exe file, and place the shortcut in the "startup" folder.Where is this folder?   