Skip to content

Instantly share code, notes, and snippets.

@simonxiao86
Created October 14, 2018 08:49
Show Gist options
  • Save simonxiao86/cd0ea2952924a2bfb9c0bc8c621f50f3 to your computer and use it in GitHub Desktop.
Save simonxiao86/cd0ea2952924a2bfb9c0bc8c621f50f3 to your computer and use it in GitHub Desktop.

Revisions

  1. simonxiao86 created this gist Oct 14, 2018.
    12 changes: 12 additions & 0 deletions vbs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    Dim name,msg
    msg="请输入文件名称:"
    name=Inputbox(msg)
    Set Arg = WScript.Arguments

    set WshShell=WScript.CreateObject("WScript.Shell")
    strDirectory="d:\qr"
    set oShellLink=WshShell.CreateShortcut(strDirectory & "\" & name & ".lnk")
    oShellLink.TargetPath=Arg(0)
    oShellLink.IconLocation=Arg(0)
    oShellLink.WorkingDirectory=strDirectory
    oShellLink.Save