How to make the application start with system

Hello,everyone:

I want to make my program run when the system boot.

So how can I do that by code Any APIs or sample codes




Answer this question

How to make the application start with system

  • Carl JimWay

    hello:

    I think you can add a key in register, when initial, you can get the register key value, if 0,you continue run the program, if 1, return.

    Best Regards,

    Kenneth Yang


  • wei hong tao

    Kenneth Yang wrote:

    hello:

    I think you can add a key in register, when initial, you can get the register key value, if 0,you continue run the program, if 1, return.

    Best Regards,

    Kenneth Yang

    That means my program have to run every time when the system boot in case of get the register key vlaue,and decide to continue or not Am I right

    Well,somehow I dont feel it reasonable.Still, thank you very much for your help.



  • Sarath.

    Add the shortcut to the start menu as Michael suggests. Then *inside* your application as it starts, decide if you want to continue running it or quit immediately.

  • Ken Villines

    Add your program to the windows startup folder. You can use the API SHCreateShortcut to create the required shortcut.



  • DoS

    Well, I got!

    Thank you all!



  • renotiko01

    Well,then sometimes I do not want the application start with the system,and smoetimes I do.So may I switch the selections in my program My question is how can I remove the shortcut from windows startup folder when I don't want the application start with system

  • How to make the application start with system