autorun怎么写

1.怎么写AUTORUNPrivate Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Private Declare Function GetPrivateProfileSection Lib "kernel32" Alias "GetPrivateProfileSectionA" (ByVal lpAppName As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
用这3个API函数可以搞定,如要源码,我这有VB的源码.
2.autorun自动执行文件怎么写autorun.inf是光盘引导文件 他表示你双击磁盘时指向那个程序
简易的autorun.inf内容为
[autorun]
open=xxx.exe
ico=xxx.exe,0
open就不用说了,是打开指定文件,这里的指定文件必须在磁盘根目录,ico是磁盘图标在这里它指向xxx.exe中的第一个图标 就是说用xxx.exe中包含的第一个图标作为磁盘图标
高级一点的就是打开路径了如:
[AutoRun]
open=F:\Downloads\a.exe
shell\open=打开(&O)
shell\open\F:\Downloads\a.exe
shell\open\Default=1
shell\explore=资源管理器(&X)
shell\explore\Command=F:\Downloads\a.exe
相信你可以看懂
【autorun怎么写】

autorun怎么写

文章插图