Jump to content

Programming Windows shortcuts using Windows Script Host


Recommended Posts

Hi people,

I am writing an application using .NET and the Windows Script Host Library to read shortcut files from a folder. Some of the shortcut files point to a destination that is on another computer. Let us say I have two PCs named \\foo and \\bar, both running Windows XP Pro. I create a shortcut to D:\files\ on \\bar and I save it on my desktop on Foo. My application [WshShortcut.TargetPath] says that the shortcut points to D:\files, as if on my computer (\\foo) instead of \\bar. But when I double click on the shortcut, somehow Windows resolves the correct path and opens the directory on \\bar. Is there a way that I can resolve this network/UNC path programmatically? Can I make WshShortcut figure out the correct path?

Thanks.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...