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.WorkingDirectory

object.WorkingDirectory

The WorkingDirectory property sets or retrieves the default working directory for the application pointed to by the shortcut. All relative paths specified in file operations are taken as being relative to the working directory.

The following VBScript code sets the working directory of the shortcut "Shortcut To Test.vbs.lnk" to "C:\Temp".

Code:
Set objShell = WScript.CreateObject("WScript.Shell")
Set objShtCut = objShell.CreateShortcut _
    ("C:\Documents And Settings\DevGuru\Desktop\Shortcut to Test.vbs.lnk")
objShtCut.WorkingDirectory = "C:\temp"
objShtCut.Save
WScript.Echo objShtCut.WorkingDirectory


Output:
C:\Temp

 


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