TargetPath Property

 

Description

 

The path of the shortcut's executable.

 

PowerBASIC Syntax

 

PROPERTY GET TargetPath () AS STRING

PROPERTY SET TargetPath(BYVAL bstrTargetPath AS STRING)

 

Arguments

 

bstrTargetPath

BSTR. A string containing the path of the shortcut's executable.

 

Remarks

 

This property is for the shortcut's target path only. Any arguments to the shortcut must be placed in the Arguments property.

 

Example [PowerBASIC]

 

#INCLUDE "WSHOM.INC"

 

' Create an instance of the Windows Script Host

LOCAL pWsh AS IWshShell

pWsh = NEWCOM "WScript.Shell"

 

' Create a shortcut programatically (if it already exists, CreateShortcut opens it)

LOCAL pLnk AS IWshURLShortcut

pLnk = pWsh.CreateShortcut(UCODE$(EXE.Path$ & "Microsoft Web Site.url"))

 

' Sets the TargetPath property

pLnk.TargetPath UCODE$("http://www.microsoft.com")

' Saves the shortcut file to disk

pLnk.Save

 

Valid XHTML 1.0 Transitional