用程序实现的话,还是修改注册表,在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 下添加一项字符串类型的键,然后将键值设为你的程序的路径 用regsetvalueex函数 dim hKey as long dim subkey as long subkey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" hKey = regOpenKey(HKEY_LOCAL_MACHINE,subkey) ret =regsetvalueex(hkey,"",reg_sz,"mypro","app.exename" _ len(strconv(app.exename,vbformunicode))+1)
用程序实现的话,还是修改注册表,在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 下添加一项字符串类型的键,然后将键值设为你的程序的路径 用regsetvalueex函数 dim hKey as long dim subkey as long subkey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" hKey = regOpenKey(HKEY_LOCAL_MACHINE,subkey) ret =regsetvalueex(hkey,"",reg_sz,"mypro","app.exename" _ len(strconv(app.exename,vbformunicode))+1)
用程序实现的话,还是修改注册表,在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 下添加一项字符串类型的键,然后将键值设为你的程序的路径 用regsetvalueex函数 dim hKey as long dim subkey as string subkey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run" hKey = regOpenKey(HKEY_LOCAL_MACHINE,subkey)ret =regsetvalueex(hkey,"",reg_sz,"mypro","app.exename" _ len(strconv(app.exename,vbformunicode))+1)
随便取个名字作键名,键值是程序路径。
下添加一项字符串类型的键,然后将键值设为你的程序的路径
用regsetvalueex函数
dim hKey as long
dim subkey as long
subkey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
hKey = regOpenKey(HKEY_LOCAL_MACHINE,subkey) ret =regsetvalueex(hkey,"",reg_sz,"mypro","app.exename" _
len(strconv(app.exename,vbformunicode))+1)
下添加一项字符串类型的键,然后将键值设为你的程序的路径
用regsetvalueex函数
dim hKey as long
dim subkey as long
subkey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
hKey = regOpenKey(HKEY_LOCAL_MACHINE,subkey) ret =regsetvalueex(hkey,"",reg_sz,"mypro","app.exename" _
len(strconv(app.exename,vbformunicode))+1)
下添加一项字符串类型的键,然后将键值设为你的程序的路径
用regsetvalueex函数
dim hKey as long
dim subkey as string
subkey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
hKey = regOpenKey(HKEY_LOCAL_MACHINE,subkey)ret =regsetvalueex(hkey,"",reg_sz,"mypro","app.exename" _
len(strconv(app.exename,vbformunicode))+1)