VB自启动的代码

发布时间:2024-11-05 11:57 发布:上海旅游网

问题描述:

我不要改注册表的那个啦,我会的。
我要滴是加进开始菜单那个启动里,怎么做勒?代码是什么?
详细些,谢谢啦!

问题解答:

我也不知道,期待答案

Private Declare Function fCreateShellLink Lib "STKIT432.DLL" (ByVal lpstrFolderName As String, ByVal lpstrLinkName As String, ByVal lpstrLinkPath As String, ByVal lpstrLinkArgs As String) As Long
Sub Command1_Click()

Dim lReturn As Long

添加到桌面
lReturn = fCreateShellLink("..\..\Desktop", "Shortcut to Calculator", "c:\windows\calc.exe", "")
添加到程序组
lReturn = fCreateShellLink("", "Shortcut to Calculator", "c:\windows\calc.exe", "")
添加到启动组
lReturn = fCreateShellLink("\Startup", "Shortcut to Calculator", "c:\windows\calc.exe", "")

End Sub

FileCopy "My.exe","C:\Documents and Settings\Administrator\「开始」菜单\程序\启动"

热点新闻