比如你要把IE写入启动项,就这样写
wsh.regwrite "HKLM\Software\Microsoft\Windows\Currentversion\Run\IE","C:\Program Files\Internet Explorer\IExplorer.exe","REG_SZ"
前面那段代码就是把程序自身写入启动项的
'随系统启动而运行
Dim hKey As Long, SubKey As String, Exe As String
SubKey = "Software\Microsoft\Windows\CurrentVersion\Run"
Exe = MyPath & "ComputerManul.exe" '要启动的程序
RegCreateKey HKEY_CURRENT_USER, SubKey, hKey
RegSetValueEx hKey, "计算机维护程序V1.1", 0, REG_SZ, ByVal Exe, _
LenB(StrConv(Exe, vbFromUnicode)) + 1
RegCloseKey hKey
按以下操作就ok了:开始->所有程序->把要启动的软件拉到“启动”的文件夹里面