On Error Resume Next Set shell = WScript.CreateObject("WScript.Shell") Set shortcut = shell.CreateShortcut(WScript.Arguments(0)) shortcut.TargetPath = WScript.Arguments(1) shortcut.WorkingDirectory = WScript.Arguments(2) shortcut.Description = WScript.Arguments(3) shortcut.IconLocation = WScript.Arguments(4) If WScript.Arguments.Count > 5 Then shortcut.Arguments = WScript.Arguments(5) End If shortcut.Save If Err.Number <> 0 Then WScript.Echo "Shortcut creation failed: " & Err.Description WScript.Quit 1 End If