[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Lloyd Dupont

12/20/2002 5:02:00 AM

how to read the information of the shortcut file in .NET/C# ?

mainly I'm interested in getting to which file a shortcut refer ...



2 Answers

Nicholas Paldino [.NET MVP]

12/20/2002 3:52:00 PM

0

Lloyd,

I would use COM interop for this. There is an object in Windows Script
Host named WshShortcut that will take a shortcut file and give you all the
information you need. You can add a reference to the "Windows Script Host
Object Library" in your project to access it.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- nicholas.paldino@exisconsulting.com

"Lloyd Dupont" <lloyd@galador.net> wrote in message
news:uHwALx9pCHA.2480@TK2MSFTNGP12...
> how to read the information of the shortcut file in .NET/C# ?
>
> mainly I'm interested in getting to which file a shortcut refer ...
>
>
>


Lloyd Dupont

12/20/2002 5:00:00 PM

0

wouaw.. it worked.
mmhh... there is still one problem, though....

I should confess I don't know how to compile it myself (on the comand
line)....
I try something like:
csc /nologo /r:Interop.wshom.dll fileexplore.cs

but csc complain:
error CS0006: Metadata file 'Interop.wshom.dll' could not be found

any idea ?

"Nicholas Paldino [.NET/C# MVP]" <nicholas.paldino@exisconsulting.com> a
écrit dans le message de news: O2MhfgDqCHA.2728@TK2MSFTNGP10...
> Lloyd,
>
> I would use COM interop for this. There is an object in Windows
Script
> Host named WshShortcut that will take a shortcut file and give you all the
> information you need. You can add a reference to the "Windows Script Host
> Object Library" in your project to access it.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - nicholas.paldino@exisconsulting.com
>
> "Lloyd Dupont" <lloyd@galador.net> wrote in message
> news:uHwALx9pCHA.2480@TK2MSFTNGP12...
> > how to read the information of the shortcut file in .NET/C# ?
> >
> > mainly I'm interested in getting to which file a shortcut refer ...
> >
> >
> >
>
>