WSH » WshShortcut » Arguments

Syntax:
object.Arguments

The Arguments property sets or retrieves a String that is the concatenation of all arguments that are to be passed to the target of the shortcut.

Examples

Code:
Set objShell = WScript.CreateObject("WScript.Shell")
Set objShtCut = objShell.CreateShortcut("C:\Test.vbs.lnk")
objShtCut.Arguments = objShtCut.Arguments & " //I //T:2"
WScript.Echo "shortcuts =", objShtCut.Arguments
objShtCut.Save
Output:
shortcuts = //D //I //T:2
Explanation:

This VBScript code appends the "//I" and "//T:2" arguments to the existing arguments list of a shortcut named "test.vbs.lnk". It then displays the ammended argument list. Assuming the shortcut already included the "//D" argument, the output shown will be generated.

Language(s): VBScript