Shortcuts Targets 
Author Message
 Shortcuts Targets

Is there anyway using the FileSystem object (or any other
Script Hosting object) that I can determine the target of
an existing shortcut?  I realize I can create shortcut
objects, but I can't seem to find a method that will read
an existing shortcut and give me the path to the target.  
Thanks.


Mon, 26 Apr 2004 06:24:49 GMT  
 Shortcuts Targets
Hi

Set WshShell = WScript.CreateObject("WScript.Shell")

Set oShellLink = WshShell.CreateShortcut( _
    "C:\Documents and Settings\<user>\Start Menu\Programs\MyProg.lnk")

msgbox oShellLink.TargetPath

--
torgeir

Quote:

> Is there anyway using the FileSystem object (or any other
> Script Hosting object) that I can determine the target of
> an existing shortcut?  I realize I can create shortcut
> objects, but I can't seem to find a method that will read
> an existing shortcut and give me the path to the target.
> Thanks.



Mon, 26 Apr 2004 06:41:39 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Desktop shortcut target problem

2. Shortcut target

3. Desktop shortcut target problem

4. Shortcut target

5. accessing shortcut target

6. Changing targets on shortcuts

7. Reading Target path from *existing* shortcut files.

8. Getting folder shortcut's targets

9. Quotes on Target when creating shortcut

10. Quotes on Target when creating shortcut

11. Reading the Target of a Shortcut

12. Creating a shortcut with UNC target and UNC argument

 

 
Powered by phpBB® Forum Software