How to make my program run at startup?

后端 未结 7 1810
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-15 14:28

I\'m programming a desktop application similar to Google desktop but with my own gadget with vb.net 2008 how can i make my application when the user install it on their comp

7条回答
  •  执笔经年
    2020-12-15 14:53

    Simpley use this code:

    Dim info As New FileInfo(application.startuppath)
    info.CopyTo(My.Computer.FileSystem.SpecialDirectories.Programs + "\startup\myapp.exe")
    

    hope it helps.

提交回复
热议问题