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

Post Reply
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

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

Post 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
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

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

Post 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
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post 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
User avatar
yam_hiong
Posts: 16
Joined: Sun Oct 23, 2005 3:00 pm
Location: Pontianak - Indonesia
Contact:

Post by yam_hiong »

Dear Rameshbabu,

Do you have solutions for your question?

I face same problem too. Any advice?

Hiong
User avatar
yam_hiong
Posts: 16
Joined: Sun Oct 23, 2005 3:00 pm
Location: Pontianak - Indonesia
Contact:

Post by yam_hiong »

Dear Rameshbabu,

never mind, i found the answer:
http://www.fivetechsoft.com/forums/view ... p+shortcut
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post 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
Post Reply