怎样找到开始菜单和桌面中快捷方式文件的存放路径(适用各种window版本)??

mr_xugang 2001-11-13 02:37:57
...全文
556 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ByTheWay 2001-11-13
  • 打赏
  • 举报
回复
to:uguess(uguess) 
你的期货分不少啊,恭喜恭喜!
uguess 2001-11-13
  • 打赏
  • 举报
回复

信息文件在WINDOWS目录下的inf文件夹中;驱动程序文件在系统目录下SYSTEM或SYSTEM32(NT\2000)
mr_xugang 2001-11-13
  • 打赏
  • 举报
回复
高手阿,pfpf!!!

你知道安装打印机驱动程序的时候相关文件都拷贝到什么地方了吗?(如果答出送你500分!!)
uguess 2001-11-13
  • 打赏
  • 举报
回复
Const CSIDL_DESKTOP = &H0 '桌面
Const CSIDL_PROGRAMS = &H2
Const CSIDL_CONTROLS = &H3
Const CSIDL_PRINTERS = &H4
Const CSIDL_PERSONAL = &H5
Const CSIDL_FAVORITES = &H6
Const CSIDL_STARTUP = &H7
Const CSIDL_RECENT = &H8
Const CSIDL_SENDTO = &H9
Const CSIDL_BITBUCKET = &HA
Const CSIDL_STARTMENU = &HB '开始菜单
Const CSIDL_DESKTOPDIRECTORY = &H10
Const CSIDL_DRIVES = &H11
Const CSIDL_NETWORK = &H12
Const CSIDL_NETHOOD = &H13
Const CSIDL_FONTS = &H14
Const CSIDL_TEMPLATES = &H15
Const MAX_PATH = 260
Private Type SHITEMID
cb As Long
abID As Byte
End Type
Private Type ITEMIDLIST
mkid As SHITEMID
End Type
Private Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal hWnd As Long, ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As Long) As Long
Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" (ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As ITEMIDLIST) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long
Private Sub Form_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
'Show an about window
ShellAbout Me.hWnd, App.Title, "Created by the KPD-Team 1999", ByVal 0&
'Set the graphical mode to persistent
Me.AutoRedraw = True
'Print the folders to the form
Me.Print "Start menu folder: " + GetSpecialfolder(CSIDL_STARTMENU)
Me.Print "Favorites folder: " + GetSpecialfolder(CSIDL_FAVORITES)
Me.Print "Programs folder: " + GetSpecialfolder(CSIDL_PROGRAMS)
Me.Print "Desktop folder: " + GetSpecialfolder(CSIDL_DESKTOP)
End Sub
Private Function GetSpecialfolder(CSIDL As Long) As String
Dim r As Long
Dim IDL As ITEMIDLIST
'Get the special folder
r = SHGetSpecialFolderLocation(100, CSIDL, IDL)
If r = NOERROR Then
'Create a buffer
Path$ = Space$(512)
'Get the path from the IDList
r = SHGetPathFromIDList(ByVal IDL.mkid.cb, ByVal Path$)
'Remove the unnecessary chr$(0)'s
GetSpecialfolder = Left$(Path, InStr(Path, Chr$(0)) - 1)
Exit Function
End If
GetSpecialfolder = ""
End Function

是这个么?

7,787

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧