今天又是带有unicode的,而且是多个,顺应修改下复用。- set objShell = CreateObject("shell.application")
- set fso = CreateObject("Scripting.FileSystemObject")
- Function createLink(path, linkName)
- set objFolder = objShell.NameSpace(path)
- set objFolderItem = objFolder.ParseName(linkName)
- if objFolderItem Is Nothing then
- fso.CreateTextFile path & linkName, true
- set objFolderItem = objFolder.ParseName(linkName)
- end if
- set createLink = objFolderItem.GetLink
- End Function
-
- rootPath = fso.GetFolder(".").Path
- Function currentPath(path)
- if isNull(path) then
- currentPath = rootPath
- elseif path = "" then
- currentPath = rootPath & "\"
- elseif path = "\" then '特殊
- currentPath = rootPath
- elseif left(path, 1) = "\" then '特殊
- currentPath = rootPath & path
- elseif right(path, 1) = "\" then
- currentPath = rootPath & "\" & path
- else
- currentPath = rootPath & "\" & path & "\"
- end if
- End Function
-
-
- set objShellLink = createLink(currentPath(""), "手垢塗れの天使.lnk")
- objShellLink.Path = currentPath("") & "angel.exe"
- objShellLink.Arguments = ""
- objShellLink.WorkingDirectory = currentPath("\")
- objShellLink.Hotkey = 0
- objShellLink.ShowCommand = 1
- objShellLink.Description = ""
- objShellLink.SetIconLocation currentPath("") & "angel.exe", 0
- objShellLink.Save()
-
- set objShellLink = createLink(currentPath(""), "手垢塗れの天使の詳細設定.lnk")
- objShellLink.Path = currentPath("") & "angel.exe"
- objShellLink.Arguments = "-userconf"
- objShellLink.WorkingDirectory = currentPath("\")
- objShellLink.Hotkey = 0
- objShellLink.ShowCommand = 1
- objShellLink.Description = ""
- 'objShellLink.SetIconLocation currentPath("") & ".exe.ico.dll", 0
- objShellLink.Save()
-
- set objShellLink = createLink(currentPath(""), "手垢塗れの天使のファイル破損チェック.lnk")
- objShellLink.Path = currentPath("data") & "ファイル破損チェックツール.exe"
- objShellLink.Arguments = ""
- objShellLink.WorkingDirectory = currentPath("\")
- objShellLink.Hotkey = 0
- objShellLink.ShowCommand = 1
- objShellLink.Description = ""
- 'objShellLink.SetIconLocation currentPath("") & ".exe.ico.dll", 0
- objShellLink.Save()
复制代码
|