Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,, there

I want my Win32 dialog based application to run automatically when system start..

how can i do this ?
Posted
Comments
Espen Harlinn 14-Feb-11 4:52am    
What do you mean by "System Start"? during boot? or when a user logs on to the system?

 
Share this answer
 
Comments
Espen Harlinn 14-Feb-11 15:47pm    
Good link, while in c# it still shows how to do it, my 5
Manfred Rudolf Bihy 14-Feb-11 16:01pm    
Oops, my bad. :)
Of course you can do it. There are serveral ways of doing it.
1. You can add your program to the Startup folder
2. You can do it by adding an entry to HKCU\Software\Microsoft\Windows\CurrentVersion\Run registry keys.

Here are few pointers:

http://oreilly.com/pub/a/oreilly/windows/ron/startup_0401.html[^]
 
Share this answer
 
Comments
Espen Harlinn 14-Feb-11 15:46pm    
Well, right, my 5
First and most advanced option is developing a Windows Service. It will run on system start if you use Auto option in its properties.

There are good number of place where to register an application to run on start. I use my own method based on SysInternals application "AutoRuns".

Visit Sysinternals, Download SysInternals Suite: http://technet.microsoft.com/en-us/sysinternals/bb842062[^] (you can download just AutoRuns, but whole suite is so useful, see the index: http://technet.microsoft.com/en-us/sysinternals/bb545027[^]).

Unpack and execute AutoRuns. It will show a tree with the comprehensive list of locations. You can use "go to registry" feature to locate the registry key, which you need to do programmatic installation.

—SA
 
Share this answer
 
Comments
Espen Harlinn 14-Feb-11 18:17pm    
Good information, my 5 :)
Sergey Alexandrovich Kryukov 14-Feb-11 18:22pm    
Than you, Espen,
Another repeating topic,
--SA
perry.p 14-Feb-11 23:25pm    
services mode option is not possible ....
Sergey Alexandrovich Kryukov 15-Feb-11 15:14pm    
This is up to you -- use other ways.
I'm just trying to help you to overview all possibilities.

It depends if you want it per user or for any user and other factors.
If this is per user, you could simply add a link to Programs/Startup menu.
Most likely you need Run, as in the answer by Yusuf.

--SA
you can add the application path in RUN entry in CURRENT_USER or LOCAL_MACHINE
 
Share this answer
 
well if you want the program to start up after the login screen then you got all the information you need.

if you want to run the program before the login screen, then there is a way too, at least for Windows XP Professional

RUN gpedit.msc

go to "Windows Settings" it is under "Computer Configuration"
Open "Scripts(Startup/Shutdown)"
Open "Startup" in right pane.
Click "Add" button and browse to your program and then click "ok".

(i am not sure if you can do this on post vista operating systems)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900