分类: C/C++
2008-08-01 16:58:10
''=========================================================== '' '' NAME:下载本文示例代码'' '' AUTHOR: Ivan Chen , Zsu '' DATE : 2003-5-12 '' '' COMMENT: '' ''============================================================= Const strDestination = "H:\Movie\" Set objArgs = WScript.Arguments Set WshShell = WScript.CreateObject("WScript.Shell") For i = 0 to objArgs.Count - 1 '' Loop through all arguments. strShortCut = strDestination & "\" & GetAName(objArgs(i)) & ".lnk" set oShellLink = WshShell.CreateShortcut(strShortCut) oShellLink.TargetPath = objArgs(i) oShellLink.WindowStyle = 1 ''oShellLink.Description = "Created By Ivan Chen" oShellLink.WorkingDirectory = Left(objArgs(i), InStrRev(objArgs(i), "\")) oShellLink.Save Next Function GetAName(DriveSpec) Dim fso Set fso = CreateObject("Scripting.FileSystemObject") GetAName = fso.GetFileName(DriveSpec) End Function ''end