PC Review


Reply
Thread Tools Rate Thread

Creating .Lnk

 
 
Felipe T.
Guest
Posts: n/a
 
      4th Mar 2004
Hi guys, another question...Sorry, but they just keep coming....
....I want to programatically create a link to a file. This link must b
located in any directory i want, and the file will b stuck in its natural
directory. Any way of doing this?

Thx


 
Reply With Quote
 
 
 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      4th Mar 2004
You can programmatically create a shortcut by P/Invoking the
SHCreateShortcut API function. See here for the code to do it:-
http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=300

Peter

--
Peter Foot
Windows Embedded MVP
OpenNETCF.org Senior Advisor
www.inthehand.com | www.opennetcf.org

"Felipe T." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi guys, another question...Sorry, but they just keep coming....
> ...I want to programatically create a link to a file. This link must b
> located in any directory i want, and the file will b stuck in its natural
> directory. Any way of doing this?
>
> Thx
>
>



 
Reply With Quote
 
Paul G. Tobey [eMVP]
Guest
Posts: n/a
 
      4th Mar 2004
Also, you can create the shortcut as a simple text file (if you have no
shell and can't access that API, for instance). The format is:

<char count>#<command line>

So, to run a program called myprog.exe with a /run parameter, the file would
contain something like:

15#myprog.exe /run

Paul T.

"Peter Foot [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You can programmatically create a shortcut by P/Invoking the
> SHCreateShortcut API function. See here for the code to do it:-
> http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=300
>
> Peter
>
> --
> Peter Foot
> Windows Embedded MVP
> OpenNETCF.org Senior Advisor
> www.inthehand.com | www.opennetcf.org
>
> "Felipe T." <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi guys, another question...Sorry, but they just keep coming....
> > ...I want to programatically create a link to a file. This link must b
> > located in any directory i want, and the file will b stuck in its

natural
> > directory. Any way of doing this?
> >
> > Thx
> >
> >

>
>



 
Reply With Quote
 
Felipe T.
Guest
Posts: n/a
 
      8th Mar 2004
Thx

"Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in
message news:e$(E-Mail Removed)...
> Also, you can create the shortcut as a simple text file (if you have no
> shell and can't access that API, for instance). The format is:
>
> <char count>#<command line>
>
> So, to run a program called myprog.exe with a /run parameter, the file

would
> contain something like:
>
> 15#myprog.exe /run
>
> Paul T.
>
> "Peter Foot [MVP]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > You can programmatically create a shortcut by P/Invoking the
> > SHCreateShortcut API function. See here for the code to do it:-
> > http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=300
> >
> > Peter
> >
> > --
> > Peter Foot
> > Windows Embedded MVP
> > OpenNETCF.org Senior Advisor
> > www.inthehand.com | www.opennetcf.org
> >
> > "Felipe T." <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi guys, another question...Sorry, but they just keep coming....
> > > ...I want to programatically create a link to a file. This link must b
> > > located in any directory i want, and the file will b stuck in its

> natural
> > > directory. Any way of doing this?
> > >
> > > Thx
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with creating query or creating report Need Help Microsoft Access Database Table Design 0 29th Apr 2008 02:22 AM
Creating VBA Functions When Creating Spreadsheet Via VBA? PeteCresswell Microsoft Excel Programming 6 18th Jun 2007 12:38 PM
creating PDF from msword - I get error while creating bookmarks =?Utf-8?B?bWFyay1uZWVkcy1oZWxw?= Microsoft Word Document Management 1 1st Nov 2005 05:48 AM
Auto creating text fields when creating new slide. =?Utf-8?B?amFtZXM=?= Microsoft Powerpoint 1 16th Jun 2005 04:02 PM
Walkthrough: Creating a Dist. App. - problems creating project =?Utf-8?B?R2FyeURvdE5ldA==?= Microsoft Dot NET 1 12th Aug 2004 03:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:59 PM.