Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











Property:  WshShortcut.TargetPath

object.TargetPath

The TargetPath property sets or retrieves the location of the file that is the target of the shortcut. The arguments that are passed to the shortcut are unaffected by the setting of this property.

The following VBScript code sets the target for a shortcut called "Shortcut to Test Script.lnk" to "C:\test.js".

Code:
Set objShell = WScript.CreateObject("WScript.Shell")
Set objShtCut = objShell.CreateShortcut _
    ("C:\Documents And Settings\DevGuru\Desktop\Shortcut To Test Script.lnk")
objShtCut.TargetPath = "C:\test.js"
objShtCut.Save
WScript.Echo objShtCut.TargetPath


Output:
C:\Test.js

 


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