Property:  WshShortcut.Arguments

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.

The following 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.

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

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information