The information in this article applies to:
SUMMARYThis article demonstrates how to create a shortcut with parameters to be passed as command line arguments using the Microsoft Windows Script Host (WSH). MORE INFORMATIONTo ensure that the necessary parameters are set correctly when using WSH to create a shortcut, use the WshShortcut.Arguments property in conjunction with WshShortcut.TargetPath. For example, the following code sample demonstrates how to create a shortcut (aaa.lnk) to open a text file (aaa.txt) using Microsoft Notepad:
Note: When using this code sample, you might need to include the full path for the WshShortcut.TargetPath property. The WshShortcut.Arguments property can also be used for parameters that include forward slashes as well. For example, the following code sample demonstrates how to use the /u argument for Regsvr32.exe to unregister the control Mycontrol.ocx.
REFERENCESFor more information on the Windows Script Host, see the following Microsoft Web page: Windows Script Technologies Additional query words:
Keywords : kbGrpPlatform kbWSH100 kbDSupport |
Last Reviewed: September 24, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |