以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  开机启动  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=131309)

--  作者:cd_tdh
--  发布时间:2019/2/22 17:25:00
--  开机启动

老师看了这个帖子,

http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=73350&replyID=&skin=1

 

我设置了,代码放在afterOpenProject,开机没有自动启动哪儿有问题?

 

Dim starupPath = ProjectPath & "集团OA系统.exe"

Dim loca = Microsoft.Win32.Registry.LocalMachine
Dim run = loca.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run")

\'run.SetValue("集团OA系统", False) \'取消开机运行
run.SetValue("集团OA系统", starupPath) \'设置开机运行
loca.Close()


--  作者:有点蓝
--  发布时间:2019/2/22 17:28:00
--  
这个代码只是添加一个启动项。重启电脑看有没有启动