[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
今天又是带有unicode的,而且是多个,顺应修改下复用。
  1. set objShell = CreateObject("shell.application")
  2. set fso = CreateObject("Scripting.FileSystemObject")
  3. Function createLink(path, linkName)
  4.     set objFolder = objShell.NameSpace(path)
  5.     set objFolderItem = objFolder.ParseName(linkName)
  6.     if objFolderItem Is Nothing then
  7.         fso.CreateTextFile path & linkName, true
  8.         set objFolderItem = objFolder.ParseName(linkName)
  9.     end if
  10.     set createLink = objFolderItem.GetLink
  11. End Function
  12. rootPath = fso.GetFolder(".").Path
  13. Function currentPath(path)
  14.     if isNull(path) then
  15.         currentPath = rootPath
  16.     elseif path = "" then
  17.         currentPath = rootPath & "\"
  18.     elseif path = "\" then               '特殊
  19.         currentPath = rootPath
  20.     elseif left(path, 1) = "\" then      '特殊
  21.         currentPath = rootPath & path
  22.     elseif right(path, 1) = "\" then
  23.         currentPath = rootPath & "\" & path
  24.     else
  25.         currentPath = rootPath & "\" & path & "\"
  26.     end if
  27. End Function
  28. set objShellLink = createLink(currentPath(""), "手垢塗れの天使.lnk")
  29. objShellLink.Path = currentPath("") & "angel.exe"
  30. objShellLink.Arguments = ""
  31. objShellLink.WorkingDirectory = currentPath("\")
  32. objShellLink.Hotkey = 0
  33. objShellLink.ShowCommand = 1
  34. objShellLink.Description = ""
  35. objShellLink.SetIconLocation currentPath("") & "angel.exe", 0
  36. objShellLink.Save()
  37. set objShellLink = createLink(currentPath(""), "手垢塗れの天使の詳細設定.lnk")
  38. objShellLink.Path = currentPath("") & "angel.exe"
  39. objShellLink.Arguments = "-userconf"
  40. objShellLink.WorkingDirectory = currentPath("\")
  41. objShellLink.Hotkey = 0
  42. objShellLink.ShowCommand = 1
  43. objShellLink.Description = ""
  44. 'objShellLink.SetIconLocation currentPath("") & ".exe.ico.dll", 0
  45. objShellLink.Save()
  46. set objShellLink = createLink(currentPath(""), "手垢塗れの天使のファイル破損チェック.lnk")
  47. objShellLink.Path = currentPath("data") & "ファイル破損チェックツール.exe"
  48. objShellLink.Arguments = ""
  49. objShellLink.WorkingDirectory = currentPath("\")
  50. objShellLink.Hotkey = 0
  51. objShellLink.ShowCommand = 1
  52. objShellLink.Description = ""
  53. 'objShellLink.SetIconLocation currentPath("") & ".exe.ico.dll", 0
  54. objShellLink.Save()
复制代码

TOP

回复 14# yu2n

不错

TOP

返回列表