Hi Don,
here's a piece of old FPW2.6 code I wrote a long time ago :) This should still be running under VFP and current OS. You can find additional information about these "Program Manager" commands in the MSDN Lib. I didn't run a current test, so I would be happy if you let me know if this is still working ok.
PARAMETERS sGroupName, sCmdLine, sName, sDefDir
iChan = DDEINITIATE( "progman", "progman" )
=DDEEXECUTE( iChan, "[CreateGroup("+CHR(34)+sGroupName+CHR(34)+")]" )
=DDEEXECUTE( iChan, "[ShowGroup("+CHR(34)+sGroupName+CHR(34)+",1)]" )
=DDEEXECUTE( iChan, "[DeleteItem("+CHR(34)+sName+CHR(34)+")]" )
=DDEEXECUTE( iChan, "[AddItem("+CHR(34)+sCmdLine+CHR(34)+","+CHR(34)+sName+CHR(34)+",,,,,"+CHR(34)+sDefDir+CHR(34)+")]" )
=DDETERMINATE(iChan)
RETURN
And here's the paramter list for the AddItem function (taken from the MSDN library):
AddItem(CmdLine [, Name] [, IconPath] [, IconIndex] [, xPos] [, yPos] [, DefDir] [, HotKey] [, fMinimize] [, fSeparateMemSpace])
Armin
>Hi All
>
>Can I programatically set the icon file of a shortcut?
>
>I am building a workstation installer. I have a dll that makes a desktop shortcut, but cannot figure out how to point the shortcut icon to a custom icon file (myicon.ico).
>
>Since I can't depend on any particular version WSH to be on the workstation, I need to do this initially with Fox or with WIN32API (although at the end of the install I will RUN with the WSH 5.6 exe version for the client's OS platform. But as I noted, it won't initally be available).
>
>The client can be any flavor of Win98, NT4, NT5 or XP. Does anyone know how to do this?
>
>Thanks
>
>Don Lowrey