Page 1 of 1

How to create a shortcut of a program on desktop with FWH

Posted: Thu May 18, 2006 1:33 am
by RAMESHBABU
Hi

Is there a way to create a shortcut for an application on Desktop
and an entry in the Programes menu of Windows, using FWH.

Thanks in advance

- Ramesh Babu P

Re: How to create a shortcut of a program on desktop with FW

Posted: Thu May 18, 2006 5:59 am
by Richard Chidiak
RAMESHBABU wrote:Hi

Is there a way to create a shortcut for an application on Desktop
and an entry in the Programes menu of Windows, using FWH.

Thanks in advance

- Ramesh Babu P
You have to use the registry to retreive the windows desktop and write to it.

This is a sample

#define HKEY_CURRENT_USER 2147483649
#define HKEY_LOCAL_MACHINE 2147483650

#define KEY_ALL_ACCESS 983103

LOCAL hKey := 0

LOCAL nType := 0

LOCAL cData := SPACE( 256 )

LOCAL nSize := LEN( cData )

REGOPENKEY( HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", 0, KEY_ALL_ACCESS, @hKey )

REGQUERYVALUE( hKey, "Desktop", 0, @nType, @cData, @nSize )

REGCLOSEKEY( hKey )

RETURN LEFT( cData, AT( CHR( 0 ), cData ) - 1 )


Just curious, why not use an automatic installer that does all this . I use a n excellent free installer for this, INNOSETUP :D

HTH

Richard

Posted: Sat May 20, 2006 12:15 am
by RAMESHBABU
Mr.Richard

Thanks for your reply.

I needed this functionality to create a shortcut on the desktop and an
entry in the programs menu automatically without user intervention.

When the user runs year end process, the programe is supposed to take
e a back-up of current year as it is and create a short-cut automatically
on desktop like 2005-06. Then prepare the data for new year keeping the
existing shortcut intact.

Can you please make it little more clear with an example using
SHORTCUT.EXE as an application which should be placed on the desktop
and programs menu.

By the way INNOSETUP is my favourate installer and I am using it already
for all my applications SETUP.

Regards and thanks in advance

- Ramesh Babu P

Posted: Tue Dec 12, 2006 2:08 am
by yam_hiong
Dear Rameshbabu,

Do you have solutions for your question?

I face same problem too. Any advice?

Hiong

Posted: Tue Dec 12, 2006 2:11 am
by yam_hiong
Dear Rameshbabu,

never mind, i found the answer:
http://www.fivetechsoft.com/forums/view ... p+shortcut

Posted: Tue Dec 12, 2006 8:39 am
by RAMESHBABU
Mr.Hiong

Thank you very much for your link.

The ZLnk Class of Mr.Carles is excellent in creating shortcuts
of any application on windows desktop.

Regards to you

- Ramesh Babu P