用这种方法,如
Dim starupPath = ProjectPath & "xxx.exe"
Dim loca = Microsoft.Win32.Registry.LocalMachine
Dim run = loca.CreateSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
'run.SetValue("我的项目", False) '取消开机运行
run.SetValue("我的项目", starupPath) '设置开机运行
loca.Close()
https://www.cnblogs.com/GT_Andy/archive/2009/05/16/1922082.html
https://msdn.microsoft.com/zh-cn/library/k23f0345.aspx
https://msdn.microsoft.com/zh-cn/library/microsoft.win32.registryvaluekind.aspx