Hello all,

I've got a problem withe the SHCreateShortcut function.
I use it like this :

SHCreateShortcut( _T("\\Windows\\Menu Démarrer\\Programmes\\myprog.lnk")
,_T("\\Program Files\\myprog.exe"));

Menu Démarrer is because the device is french ;-) (equals to Start Menu)
My shortcut is created, but in the details of the shortcut, it is written :
"\Program" File\myprog.exe
There is a " after the Program string.
Does anybody have an idea ?
Thanks a lot,

Matt.

(Pocket PC 2003 with eVC++)

Re: Problem with the SHCreateShortcut function by Peter

Peter
Sun Apr 03 15:39:27 CDT 2005

Try putting quotes around your target path (since it contains spaces) e.g.
SHCreateShortcut( _T("\\Windows\\Menu Démarrer\\Programmes\\myprog.lnk")
,_T("\"\\Program Files\\myprog.exe\""));

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://blog.opennetcf.org/pfoot/

"nop" <nop@nop.com> wrote in message
news:424fef16$0$13382$626a14ce@news.free.fr...
> Hello all,
>
> I've got a problem withe the SHCreateShortcut function.
> I use it like this :
>
> SHCreateShortcut( _T("\\Windows\\Menu Démarrer\\Programmes\\myprog.lnk")
> ,_T("\\Program Files\\myprog.exe"));
>
> Menu Démarrer is because the device is french ;-) (equals to Start Menu)
> My shortcut is created, but in the details of the shortcut, it is written
> :
> "\Program" File\myprog.exe
> There is a " after the Program string.
> Does anybody have an idea ?
> Thanks a lot,
>
> Matt.
>
> (Pocket PC 2003 with eVC++)



Re: Problem with the SHCreateShortcut function by nop

nop
Mon Apr 04 06:40:45 CDT 2005

It works :-)
Thanks !

Peter Foot [MVP] wrote:
> Try putting quotes around your target path (since it contains spaces) e.g.
> SHCreateShortcut( _T("\\Windows\\Menu Démarrer\\Programmes\\myprog.lnk")
> ,_T("\"\\Program Files\\myprog.exe\""));
>
> Peter
>