Private Sub Form_Load()
Dim wsh As New WshShell
Dim ProgDir As String, ts As String
ProgDir = wsh.SpecialFolders("Programs")
ts = ProgDir & "\我的程序组"
If Dir(ts, vbDirectory) = "" Then MkDir ts
Dim UrlLnk As WshURLShortcut, Lnk As WshShortcut
Set UrlLnk = wsh.CreateShortcut(ts & "\msdn网站.url")
UrlLnk.TargetPath = "http://msdn.microsoft.com"
UrlLnk.Save
Set Lnk = wsh.CreateShortcut(ts & "\启动程序.lnk")
Lnk.TargetPath = App.Path & "\" & App.EXEName & ".exe"
Lnk.Save
End Sub
Dim wsh As New WshShell
Dim ProgDir As String, ts As String
ProgDir = wsh.SpecialFolders("Programs")
ts = ProgDir & "\我的程序组"
If Dir(ts, vbDirectory) = "" Then MkDir ts
Dim UrlLnk As WshURLShortcut, Lnk As WshShortcut
Set UrlLnk = wsh.CreateShortcut(ts & "\msdn网站.url")
UrlLnk.TargetPath = "http://msdn.microsoft.com"
UrlLnk.Save
Set Lnk = wsh.CreateShortcut(ts & "\启动程序.lnk")
Lnk.TargetPath = App.Path & "\" & App.EXEName & ".exe"
Lnk.Save
End Sub
解决方案 »
- vb的编写OCX中怎样读 OCX所在Form表单控件的值
- 查找数据库 是否与我当前输入的值(文本框)相同 我这样写不对啊
- 如何让安装程序注册第三方控件?
- 像金山快译那类的功能条怎么做的,怎么才能自己的做的功能条总保留在最前面???
- 如何向窗体加载图片?
- 那里有免费个人主页空间??高分!!
- 请问UP是什么意思啊?
- 哈罗,非常希望大家能给我答案(关于报表问题).......
- vb 用WebBrowser打开网页
- 请教:如何用最简单的办法,从SQL Server“系统表”中获取表索引信息,表字段信息?
- 为什么不能识别主键以外的字段?在线等候。
- 怎么做WIN标准的帮助文件( *.chm )????????????????
用mkdir语句试试。