FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to create a shortcut of a program on desktop with FWH
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM

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

Posted: Thu May 18, 2006 01:33 AM

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
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM

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

Posted: Thu May 18, 2006 05:59 AM
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 :-)

HTH

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM

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

Posted: Sat May 20, 2006 12:15 AM

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
Posts: 16
Joined: Sun Oct 23, 2005 03:00 PM

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

Posted: Tue Dec 12, 2006 02:08 AM

Dear Rameshbabu,

Do you have solutions for your question?

I face same problem too. Any advice?

Hiong

Posts: 16
Joined: Sun Oct 23, 2005 03:00 PM

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

Posted: Tue Dec 12, 2006 02:11 AM

Dear Rameshbabu,

never mind, i found the answer:

http://www.fivetechsoft.com/forums/view ... p+shortcut

Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM

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

Posted: Tue Dec 12, 2006 08:39 AM

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

Continue the discussion